---恢复内容开始---
cd <directory>
Short for "change directory".
The shorthand name for the current directory is .
The shorthand name for the parent directory is ..
pwd
present working directory
ls
list the contents of the present directory
mkdir <directory> //<directory> is the represent for the name of the directory
Short for "make directory",this command will create a new subdirectory called <directory> located in the current directory
cp <source> <destination> // 仅复制单个文件,不能复制文件夹
Short for "copy",this command will allow you to create a duplicate of the file you specify as <source>,whichi it will save in <destination>
eg. cp hello.c hi.c // copy hello.c and rename the copyfile as hi.c in the present directory
-r <directory> <destinction> //加了参数 -r 表示复制文件夹
Short for "recursive",copy the directory recursively.copy the <directory> and copy every folder that exists inside of it and every file that exists inside of it.In other words, It need to recursively dive down into <destincton> and make a copy of everything in there
rm <file> // 仅删除单个文件,不能删除文件夹
Short for "remove",this command will delete<file> after it asks you to confirm (y/n) you want to delete it.
-f <file>
Short for "force",foce rm to do exactly what we're telling it to do.
but use at your own peri!there's no undo.
-r <directory>
to delete entire directories you need to use the -r flag,just as was the case with cp.
-rf
combine the -r and -f flags into -rf .Again,careful!There's no undo!
mv // 移动文件
Short for "move",this command will allow you to effectively rename a file,moving it from <source> to <destination>.
Rename Source to DEST,or move SOURCE(s)to DIRECTORY.
problem: su command cannot use
sudo passwd // set root password;and then you can use su command
---恢复内容结束---