Linux Shell命令
ls命令
查看目录下的非软链接文件(通过grep来排除),并且排除"."和".."目录(-A选项)
yuxuecheng@linux:~/shellSource> ls -AlR | grep -v '^l' .: total 8 -rwxr--r-- 1 yuxuecheng users 479 Sep 24 15:25 change_file_mode.sh -rwxr-xr-x 1 yuxuecheng users 214 Apr 27 10:04 test.sh yuxuecheng@linux:~/shellSource> ls -AlR .: total 8 -rwxr--r-- 1 yuxuecheng users 479 Sep 24 15:25 change_file_mode.sh -rwxr-xr-x 1 yuxuecheng users 214 Apr 27 10:04 test.sh lrwxrwxrwx 1 yuxuecheng users 7 Sep 24 15:50 test_link.sh -> test.sh yuxuecheng@linux:~/shellSource>
通过正则表达式选取指定类型的文件:
yuxuecheng@linux:~/shellSource> ls -Al total 8 -rwxr--r-- 1 yuxuecheng users 479 Sep 24 15:25 change_file_mode.sh -rwxr-xr-x 1 yuxuecheng users 214 Apr 27 10:04 test.sh lrwxrwxrwx 1 yuxuecheng users 7 Sep 24 15:50 test_link.sh -> test.sh yuxuecheng@linux:~/shellSource> ls -F | grep '*$' change_file_mode.sh* test.sh* yuxuecheng@linux:~/shellSource> ls -F | grep '@$' test_link.sh@ yuxuecheng@linux:~/shellSource>
find命令
查找指定类型的文件
yuxuecheng@linux:~> ls -Al total 148 -rw------- 1 yuxuecheng users 15049 Sep 24 12:39 .bash_history -rw-r--r-- 1 yuxuecheng users 33 Nov 6 2014 .bash_profile -rw-r--r-- 1 yuxuecheng users 1177 Nov 6 2014 .bashrc -rw-r--r-- 1 yuxuecheng users 1637 Nov 6 2014 .emacs drwxr-xr-x 2 yuxuecheng users 4096 Nov 6 2014 .fonts -rw-r--r-- 1 yuxuecheng users 18251 Nov 6 2014 .gnu-emacs -rw-r--r-- 1 yuxuecheng users 861 Nov 6 2014 .inputrc -rw------- 1 yuxuecheng users 139 Sep 24 15:52 .lesshst drwxr-xr-x 2 yuxuecheng users 4096 Nov 6 2014 .mozilla -rw-r--r-- 1 yuxuecheng users 6043 Nov 6 2014 .muttrc -rw-r--r-- 1 yuxuecheng users 1056 Nov 6 2014 .profile -rw------- 1 yuxuecheng users 413 Apr 9 16:32 .pyhistory drwx------ 2 yuxuecheng users 4096 Dec 19 2014 .ssh -rw------- 1 yuxuecheng users 19870 Sep 24 15:26 .viminfo -rw-r--r-- 1 yuxuecheng users 1483 Aug 14 12:11 .vimrc -rw-r--r-- 1 yuxuecheng users 849 Nov 6 2014 .vimrc.bak -rw-r--r-- 1 yuxuecheng users 1940 Nov 6 2014 .xim.template -rwxr-xr-x 1 yuxuecheng users 1446 Nov 6 2014 .xinitrc.template drwxr-xr-x 10 yuxuecheng users 4096 Aug 25 16:55 CSource drwxr-xr-x 3 yuxuecheng users 4096 Mar 19 2015 bin drwxr-xr-x 2 yuxuecheng users 4096 Feb 11 2015 luaSource drwxr-xr-x 2 yuxuecheng users 4096 Apr 9 16:42 pythonSource drwxr-xr-x 2 yuxuecheng users 4096 Nov 12 2014 rubySource drwxr-xr-x 2 yuxuecheng users 4096 Sep 24 15:50 shellSource -rw-r--r-- 1 yuxuecheng users 4 Sep 24 11:14 test.txt yuxuecheng@linux:~> find . -maxdepth 1 -type d . ./luaSource ./.mozilla ./shellSource ./.fonts ./pythonSource ./CSource ./.ssh ./rubySource ./bin yuxuecheng@linux:~>
相关推荐
LinuxShell脚本编程实例.pdf
资源名称:Linux Shell脚本学习基础视频资源目录:【】11a00d99b60c4e2eba3440b8aa3a6bdd【】linux_shell脚本编程_01认识shell,如何编写shell脚本和执行【】linux_shell脚本编程_02vivim简单的常用操作【】linux_...
linux shell脚本编程入门资料
运维常用的 34 个 Linux Shell 脚本.doc
sy2visor1.0.txt为实验2写的初始shell版本,sy12内去掉了下载软件(install samba等命令),sy1-2保留了下载软件命令,这两个shell脚本是实验1加实验2合起来的可通过记事本打开看源代码。 使用的操作系统:Linux ...
Linux shell 脚本攻略,学习linux新手入门的较好教材,第二版,现已出版第三版
LinuxShell脚本编程实例.doc
Linux shell脚本编写基础
Linux Shell脚本攻略(第2版) (图灵程序设计丛书) linux shell脚本攻略 电子书
学习shell脚本经典书籍《Linux shell 脚本攻略-第二版》全书源代码合集
LINUX SHELL命令练习 题
Linux Shell脚本教程:30分钟玩转Shell脚本编程 _
shell脚本学习指南 shell scripting linuxshell脚本攻略
最牛B的 Linux Shell 命令,最牛B的 Linux Shell 命令,
用户既可以输入命令执行,又可以利用 Shell脚本编程,完成更加复杂的操作。在Linux GUI日益完善的今天,在系统管理等领域,Shell编程仍然起着不可忽视的作用。深入地了解和熟练地掌握Shell编程,是每一个Linux用户的...
图灵程序设计丛书,细致剖析实际应用中的110多案例,让看似复杂的Linux Shell脚本任务迎刃而解。
LINUX SHELL脚本攻略(中文版带书签) 从网上下载的一款关于Linux学习的好书 ,
linux shell命令 有利于学习研究
Linux_shell脚本全面学习 Linux_shell脚本全面学习
Linux Shell 脚本攻略 操作系统