Robin.Liu

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

1. date: show current date and time.

2. cal: calendar.

3. df: to see the current amount of free space on your disk drives.

4. free: show the amount of the free memory(if using this command at Cygwin, crocps package should be installed first).

5. exit: to end a terminal session.

6. pwd: print name of current working directory. The working directory is the current directory that we are standing in of the file system.

7. cd: change directory. Symbol "/" stands for the root directory of a file system. And the English name of the symbol is leading slash.

  The directory in which most of your system's programs are installed is /usr/bin.

  The symbol "."(dot) refers to the current working directory and the ".."(two dot) refers to the parent directory of current working directory.

  The symbol "./" which stands for the current directory can be omitted. "./bin" is equal to "bin"

  The symbol "~" refers to your home directory.

  "$ cd" changes to your home directory.

  "$ cd -" changes to the previous directory.

  "$ cd ~user_name" changes to the user_name's home directory.

  BTW: Linux supports space character in a file name. But it's not recommended to do that.(the discussion about that)

8. ls: list directory contents.

  -l option list more info of files.

  There are some more options that can be found on the help page.

  If the prefix of a file is a period, it means that the file is hidden. So it will not be listed. Except appending -a(--all) option to ls.

  -d option list the info of the directory itself instead of its contents.

  --color colorize the file names. You can redefine ls to ls --color in /home/your_name/.bashrc to make the option always setted.(a post about this)

9. file: to determine a file type.

10. less: to display the content of a file. The name "less" is from "less is more". And "more" is a old pager command that does the similar thing as "less".

  To enable the color control characters in the file, add -r option to less.

11. cp: copy files and directories.

12. mv: move or rename files and directories.

13. mkdir: create directories.

  eg: mkdir dir1...

  when the argument of a command is followed by three periods, that means the argument can be repeated. As mkdir dir1 dir2 dir3.

14. rm: remove files and directories.

  -r or -R recursively rm directory and its contents.

  -d or --dir remove empty directory.

  -f or --force never prompt.

  gvfs-trash: to move file to the trash rather than delete it like rm does. Just have tried in Ubuntu.

15. ln: create hard and symbolic links.

 

posted on 2016-03-12 23:45  Robin.Liu  阅读(158)  评论(0编辑  收藏  举报