4.modify the help page"22}23default='.'24args=($@)25if[[ ${#args[@]} -gt1]];then26## the * meta means all the things in the current directory, length of it is gt 1 when current dir contains27## more than 1 thing, 1 if there is only one thing, le 1 when em...
例如:find . -size +2M -a -type f 查找当前目录大小大于2MB的普通文件。 其他辅助命令 命令一 -exect 命令二{}\ 表示对查找到的命令执行命令二。{}代指命令一的结果。 例如: find /home/learner/Interaction/ -type f -a -iname matplolib -a -size -2M -exec rm -rf {} \; 表示对在/home/l...
chmod go-rwx directory1:撤销群组和其它用户对目录directory1的读、写、执行权限。 chown- 改变文件或目录的所有权: chown user1 file1:将文件file1的所有权改为用户user1。 chown -R user1 directory1:递归地将目录directory1及其下所有文件和子目录的所有权改为用户user1。 chgrp- 改变文件或目录所属的群组:...
security context and file name. --scontext Display only security context and file name. --help 显示此帮助信息并退出 --version 显示版本信息并退出 SIZE 可以是一个可选的整数,后面跟着以下单位中的一个: KB 1000,K 1024,MB 1000*1000,M 1024*1024,还有 G、T、P、E、Z、Y。 使用色彩来区分文件类...
<directory> mountpoint for bind mounts (see --bind/rbind) <file> regular file for loopdev setup Operations: -B, --bind mount a subtree somewhere else (same as -o bind) -M, --move move a subtree to some other place -R, --rbind mount a subtree and all submounts somewhere else -...
o The error No such file or directory indicates the problem with the filename. o 程序名称 ls。一些程序会省略这个标识信息,在编写shell脚本时可能会有些烦人,但这并不是什么大问题。 o 文件名 /dsafsda,它是一个更具体的信息。这个路径有问题。
ls -AS 2️⃣ cp 命令 – 复制文件或目录 cp命令可以理解为英文单词copy的缩写,其功能为复制文件或目录。 cp命令可以将多个文件复制到一个具体的文件名或一个已经存在的目录下,也可以同时复制多个文件到一个指定的目录中。 语法: “ 语法格式:cp [参数] [文件] ...
#print work directorypwd#打印当前工作目录 2.3.9 历史指令查询 ## history 2.3.10 目录分隔符 ## windows:C:\Users\ls198\Desktop # 微软故意用\,其他的unix分支系统都是/来分割## linux:/root/jaden/xx## linux只有一个盘符,不像windows,可以设置c盘、d盘...## /是根目录## /root 根目录下面的root...
command, when run without any arguments, doesn't show directory size. However, usingtreewith-hdisplays directories and files in a human-readable format and includes their sizes. To print only directory sizes (without file sizes), add the-dargument. Therefore, print the current directory size ...
Also note that this approach is only suitable if we want to sort entire directories by size, not just individual files. 3. Using thelsandsortCommands We can use a combination ofls,grep,andsortcommands to list and sort files according to their size: ...