loop with seq
#!/bin/bash
for n in seq 1 3 100
do
echo $n
done
loop find mv
1 | #!/bin/bash |
ls only folder
ls -d */
/ is a pattern that matches all of the subdirectories in the current directory ( would match all files and subdirectories; the / restricts it to directories). Similarly, to list all subdirectories under /home/alice/Documents, use ls -d /home/alice/Documents/*/
查找系统中所有文件长度为0的普通文件,并列出它们的完整路径
find / -type f -size 0 -exec ls -l {} ;
vi .bash_profile
alias lf=”ls -l | egrep -v ‘^d’”
alias ldir=’ls -d */‘
lf 只显示文件
ldir 只显示目录