Linux 常用命令彙編(一)

1.man
對於那些不確定其用法的命令(比如是:ls),我們可以首先使用man命令來了解
使用格式:man ls
可以使用空格鍵翻頁,或者使用上、下箭頭鍵上下翻頁,要退出,則輸入 q或 CTRL-Z。
2.find
如果您知道文件的名稱、或者甚至名稱的一部分,但不知道它所處的目錄,可以使用find命令。比如你要找文件file,
命令格式:find  / -name 'file'
3.ln
用於在文件之間建立鏈接
命令格式: ln [OPTION]... TARGET [LINK_NAME]
常用的[OPTION]:-s, --symbolic make symbolic links instead of hard links
執行這個命令之後,[LINK_NAME]-->TARGET,二者建立了鏈接關係,所有指向[LINK_NAME]的動作都會重新指向TARGET.
4.tar
tar是個歸檔命令,通過使用適當的選項可以壓縮/解壓縮文件.常見的如:
解壓縮.gz文件: tar -zxf ZipFileName.tar.gz
解壓縮.bz2文件: tar -jxf ZipFileName.tar.bz2
5.yum
#following from man page
NAME
       yum - Yellowdog Updater Modified

SYNOPSIS
       yum [options] [command] [package ...]

DESCRIPTION
       yum  is  an interactive, automated update program which can be used for
       maintaining systems using rpm

       command is one of:
        * install package1 [package2] [...]
        * update [package1] [package2] [...]
        * check-update
        * upgrade [package1] [package2] [...]
        * remove | erase package1 [package2] [...]
        * list [...]
        * info [...]
        * provides | whatprovides feature1 [feature2] [...]
        * clean [ packages | headers | metadata | cache | dbcache | all ]
        * makecache
        * groupinstall group1 [group2] [...]
        * groupupdate group1 [group2] [...]
        * grouplist
        * groupremove group1 [group2] [...]
        * groupinfo group1 [...]
        * search string1 [string2] [...]
        * generate-rss [updates]

       Unless the --help or -h option is given, one of the above commands must
       be present.
6.
uname
檢查你使用的內核版本
    -a, --all
              print all information, in the following order:
       -s, --kernel-name
              print the kernel name
       -n, --nodename
              print the network node hostname
       -r, --kernel-release
              print the kernel release
       -v, --kernel-version
              print the kernel version
       -m, --machine
              print the machine hardware name
       -p, --processor
              print the processor type
       -i, --hardware-platform
              print the hardware platform
       -o, --operating-system
              print the operating system
       --help display this help and exit
       --version
              output version information and exit

參考資料:
Linux 文件命令精通指南(上) 
Linux 系統命令精通指南(下)
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章