The basic command linux disk management commands (ls, cd, pwd, mkdir, rmdir)

linux disk management commands

1.ls (list) command: to list contents.

  Format: ls [parameters] [file or directory]

  ls -a or -all flag to list all files and directories, start with a dot is hidden shadow file, for example, .bash_history.

  Use ls -l detailed list format

  ls -t sort by modification time of files and directories

  ls -r Reverse Sort Order

  ls --help parameters help

2.cd (change directory) command: change directory

  Format: cd [directory]

  cd ~, represents the current user directory

  cd /, to switch to the root directory

  cd -, switch to the last visited directory

  cd .., switching to the parent directory

  cd, the current default user directory

3.pwd (print working directory) command: Displays the current working directory

4.mkdir (make directory) command: create a directory

  -P case represents the parent directory does not exist to create the parent directory

  -v displays detailed information during the execution of the command

  For example: mkdir -pv / jason / hello jason create a directory, then create a directory Jason hello there

5. rmdir command: delete empty directories.

  -p delete the specified directory and parent directory

  -v displays the execution procedure to delete directory

  For example: rmdir -pv / jason / hello / world, represents the world directory and its parent directory deleted until the directory jason deleted.

  --help Online Help

6.clear command: clear the screen.

Guess you like

Origin www.cnblogs.com/jasonboren/p/10967547.html