centos--Add, delete, check and change

1. Query:

查看目录下有哪些内容: ls
查看文件中的内容:cat

2. Create

  创建文件:touch
	touch class.txt 
	echo "hellio" > class.txt

创建目录:mkdir  目录名(make  directory)
创建符号链接:ln  -s  /tmp/class1.txt    /root/Desktop/
	                       (源文件绝对路径) (目标文件路径)
			-a显示隐藏文件     -l   显示文件的详细信息
			-lh   显示文件大小  -R   递归显示目录中的子目录内容

3. Cut and copy:

mv  class1.txt   class   将txt剪切到class中
mv   class1.txt   class.txt   重命名
cp    class1.txt  /tmp    复制文件到tmp目录下
拷贝文件加上-r

4. Delete

rm  (remove移除)
rm   class.txt
rm  -f   text.txt    强制删除
rm  -rf   class   删除目录及其所有子文件

View the help manual for the command word: man ls
internal command: the command that comes with the command interpreter help cd
external command: the command word of the installed third-party software (basically there are command manuals)

Guess you like

Origin blog.csdn.net/tansty_zh/article/details/108016580