linux terminal 日常shell
1 ubuntu中如何将终端添加到右键
/home/cui/.local/share/nautilus/scripts
#!/bin/bash
#cd $NAUTILUS_SCRIPT_CURRENT_URI
#当前目录 cd $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
#选中文件目录
exec gnome-terminal
2 获取文件夹大小
du -h --max-depth=
cui@bug:~/ide$ du --help
用法:du [选项]... [文件]...
或:du [选项]... --files0-from=F
Summarize disk usage of each FILE, recursively for directories. Mandatory arguments to long options are mandatory for short options too.
-, --null end each output line with byte rather than newline
-a, --all write counts for all files, not just directories
--apparent-size print apparent sizes, rather than disk usage; although
the apparent size is usually smaller, it may be
larger due to holes in ('sparse') files, internal
fragmentation, indirect blocks, and the like
-B, --block-size=SIZE scale sizes by SIZE before printing them. E.g.,
'-BM' prints sizes in units of ,, bytes.
See SIZE format below.
-b, --bytes equivalent to '--apparent-size --block-size=1'
-c, --total produce a grand total
-D, --dereference-args dereference only symlinks that are listed on the
command line
-d, --max-depth=N print the total for a directory (or file, with --all) //指定显示大小信息的深度 若为1,即当前目录下文件和文件夹大小
only if it is N or fewer levels below the command
line argument; --max-depth= is the same as
--summarize
--files0-from=F summarize disk usage of the NUL-terminated file
names specified in file F;
If F is - then read names from standard input
-H equivalent to --dereference-args (-D)
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G) //人类刻度 不指定返回字节,指定返回 kb MB
-k like --block-size=1K
-L, --dereference dereference all symbolic links
-l, --count-links count sizes many times if hard linked
-m like --block-size=1M
-P, --no-dereference don't follow any symbolic links (this is the default)
-S, --separate-dirs do not include size of subdirectories
--si like -h, but use powers of not
-s, --summarize display only a total for each argument
-t, --threshold=SIZE exclude entries smaller than SIZE if positive,
or entries greater than SIZE if negative
--time show time of the last modification of any file in the
directory, or any of its subdirectories
--time=WORD show time as WORD instead of modification time:
atime, access, use, ctime or status
--time-style=STYLE show times using style STYLE:
full-iso, long-iso, iso, +FORMAT
FORMAT is interpreted like 'date'
-X, --exclude-from=FILE exclude files that match any pattern in FILE
--exclude=PATTERN exclude files that match PATTERN
-x, --one-file-system skip directories on different file systems
--help 显示此帮助信息并退出
--version 显示版本信息并退出 所显示的数值是来自 --block-size、DU_BLOCK_SIZE、BLOCK_SIZE
及 BLOCKSIZE 环境变量中第一个可用的 SIZE 单位。
否则,默认单位是 字节(或是 ,若设定 POSIXLY_CORRECT 的话)。 SIZE is an integer and optional unit (example: 10M is **). Units
are K, M, G, T, P, E, Z, Y (powers of ) or KB, MB, ... (powers of ). 请向bug-coreutils@gnu.org 报告du 的错误
GNU coreutils 的主页:<http://www.gnu.org/software/coreutils/>
GNU 软件一般性帮助:<http://www.gnu.org/gethelp/>
请向<http://translationproject.org/team/zh_CN.html> 报告du 的翻译错误
要获取完整文档,请运行:info coreutils 'du invocation'
linux terminal 日常shell的更多相关文章
- terminal(终端),shell,tty,console(控制台)区别
原文地址 stackexchange:What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'con ...
- Linux Terminal命令
Linux Terminal命令 1.Ctrl + a 回到命令行の「行首/head」. 2.Ctrl + e 回到命令行の「行尾/tail」, ctrl + end. 3.Ctrl + w 後向/b ...
- centos linux 系统日常管理4 scp,rsync,md5sum,sha1sum,strace ,find Rsync 常见错误及解决方法 第十七节课
centos linux 系统日常管理4 scp,rsync,md5sum,sha1sum,strace ,find Rsync 常见错误及解决方法 第十七节课 rsync可以增量同步,scp不行 ...
- centos linux系统日常管理3 服务管理ntsysv,chkconfig,系统日志rsyslog,last ,lastb ,exec,xargs,dmesg,screen,nohup,curl,ping ,telnet,traceroute ,dig ,nc,nmap,host,nethogs 第十六节课
centos linux系统日常管理3 服务管理ntsysv,chkconfig,系统日志rsyslog,last ,lastb ,exec,xargs,dmesg,screen,nohup,cur ...
- centos Linux系统日常管理2 tcpdump,tshark,selinux,strings命令, iptables ,crontab,TCP,UDP,ICMP,FTP网络知识 第十五节课
centos Linux系统日常管理2 tcpdump,tshark,selinux,strings命令, iptables ,crontab,TCP,UDP,ICMP,FTP网络知识 第十五节课 ...
- centos Linux系统日常管理1 cpuinfo cpu核数 命令 w, vmstat, uptime ,top ,kill ,ps ,free,netstat ,sar, ulimit ,lsof ,pidof 第十四节课
centos Linux系统日常管理1 cpuinfo cpu核数 命令 w, vmstat, uptime ,top ,kill ,ps ,free,netstat ,sar, ulimit ...
- 第一阶段考试:实战Linux系统日常管理
1. [项目名称] 实战Linux系统日常管理 [项目说明] 1.安装部署rhel系统,组建RAID磁盘阵列. 2.安装nginx 通过脚本编写 nginx服务服务启动脚本 [项目考核技能点] 1.安 ...
- (零)linux 学习 -- 从 shell 开始
The Linux Command Line 读书笔记 - 部分内容来自 http://billie66.github.io/TLCL/book/chap02.html 文章目录 前言 什么是 she ...
- How to change Linux Terminal display username
How to change Linux Terminal display username 如何更改 Linux Terminal 显示的用户名 (base) ➜ ~ whoami xgqfrms-m ...
随机推荐
- eclipse中的tomcat debug模式启动报超时45s
在eclipse中加入tomcat,开debug模式非常好用,这里就不介绍了 最近eclipse的tomcat开debug模式就是启动不了,增加时间也不能解决,但是非debug模式就可以打开,我觉得是 ...
- HTTP权威指南学习心得
一.HTTP请求的步骤: 1.从url中读取主机名 2.利用DNS(domain name service)对主机名进行转换,得到IP地址 3.如果有端口号的话,读取端口号 4.根据IP地址和端口号, ...
- BootStrap2学习日记22---点击展开
先看效果: Code: <div class="accordion" id="accordion2"> <div class="ac ...
- Java SE ---流程控制语句
java的控制流程有三种: 一,顺序流程 自上而下,按照代码的先后顺序执行 二,分支流程 1,if/else语句 2,swit ...
- 每天一道面试题(2):实现strncpy
目录 0. 为何要写strncpy? 1. 源码及测试结果 2. 面试注意事项 3. 小结
- [WinForm] 使用反射将业务对象绑定到窗体或控件容器
在WebForm中,可以使用反射将业务对象绑定到 ASP.NET 窗体控件.最近做Winform项目,也参考WebForm中的代码实现同样的功能. Winform没有提供类似WebForm中的 ...
- MySQL(23):事务的隔离级别出现问题之 脏读
1. 脏读 所谓的脏读就是指一个事务读取了另一个事务未提取的数据. 试想一下:a账户要给b账户100元购买商品,如果a账户开启一个事务,执行下面的update语句做了如下转账的工作: update a ...
- 【python,排序】几种常用的排序算法,使用python实现
1. 选择排序 -- -- def selectSort(l): for i in range(len(l)): j = i + 1 t_min = l[i] loc_min = i for j in ...
- 重构7-Rename(method,class,parameter)
这是我最常用也是最有用的重构之一.我们对方法/类/参数的命名往往不那么合适,以至于误导阅读者对于方法/类/参数功能的理解.这会造成阅读者的主观臆断,甚至引入bug.这个重构看起来简单,但却十分重要. ...
- tornado 杂记
一.建立一个简单的 hello world 网页 ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 import tornado.iolo ...