测试员小白必经之路----常见的linux操作命令

linux作为服务器操作系统 linux具有自己的优势安全稳定免费占有率高

操作系统发展历史

    unix>minix>linux

linux命令的基本使用

查阅命令帮助信息 command -help

查阅man时的操作键: man command

Linux基本的命令(一)

1.查看文件信息:ls ls -lah (l:显示列表 a:显示隐藏文件 h:显示文件的大小)

2.清屏:clear

3.切换工作目录:cd

4.显示当前路径 pwd

5.创建目录:mkdir a/b -p(可以)

6.删除文件:rm -i -r abc (i防止文件误删)

7.拷贝:cp 1.txt  2.txt (-a保持文件原有属性   -i交互  -v拷贝进度)

8.移动、重名:mv 1.txt 2.txt

9.创建文件:touch hello.txt

Linux基本的命令(二)

1.输出重定向命令:ls >test.txt  (>覆盖其内容  >>内容尾随其后) 

2.分屏显示:more test.txt

3.管道 |  : ls /  | more (一个命令的输入可以通过管道为另一个命令的输入)

4.建立链接文件:软链接 :in -s  源文件 链接文件   硬链接:去掉-s

5.查看或者合并文件内容:cat  test1.txt test2.txt

6.文本搜索:grep  'a'  1.txt

7.查找文件:find .name  '*.sh'

8.归档管理:(打包: tar  cvf a.tar  *.txt   解压:tar xvf a.tar -c atar

9.修改文件权限:chmod 777 test/-R  (test所有文件加上777权限)

file:///C:/Users/86158/AppData/Local/Temp/baiduyunguanjia/onlinedit/cache/0db5c78ce68df5892633fbf1386dad41/linux基本命令.pdf

原文地址:https://www.cnblogs.com/1996-88/p/11498714.html