some Linux shell commands

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了some Linux shell commands相关的知识,希望对你有一定的参考价值。

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 have been 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 well 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.

 

以上是关于some Linux shell commands的主要内容,如果未能解决你的问题,请参考以下文章

[Python] 利用commands模块执行Linux shell命令

Linux shell command学习笔记

linux shell学习四

Linux Shell command (Quick Study)

Linux shell command学习笔记

Linux主要shell命令详解