File directory processing commands
file directory processing commandslsls-a #查看所有的文件, including hidden files to. files that begin with.mkdir-P #递归创建目录pwdfor print working directory #显示当前所在的目录RM#删除文件或者目录, usageRM–RF Test.txt (-R means recursion,-f = mandatory)MV#重命名或者移动文件或者目录, usage,MVold.txt new.txtTouchCreate files, usage,TouchTest.txt, if the file exists, it means that the current file time is modifiedCP#拷贝文件, usage,CPOld.txt/tmp/new.txt, often used to backup, if the copy directory needs to add-r parameter. Clear#清屏Cat#是全部查看, if you have a lot of space, you can only see the last space available using cat and more, for example:CatTest.txt | MorePagination Displays text content, | The symbol is a pipe character used to put |the output of the previous command as input to the following commands. Less/#文件名 with more, you can also page up. Input/+to find the information, then next find the next Less/etc/passwd# progressive ViewHead-N Number of rows/file name look at the first few linesHead-NTenTail-N/#文件名 look at the following lines do not add the default look at 10 linesTail-f #实时查看更新, such as login informationTail-fn -/var/log/Messages #查看默认100行LN-S #软链接 # as lrwxrwxrwx as Windows shortcuts.1Root root9Dec the -: ,First.txt-First.txt
Linux Common commands