找到了大一是做的Linux命令笔记,哈哈,纯小白才不会笑
第一部分
练习linux基本命令:touch xx(创建文件xx及修改文xx件建立时间)
ll xx、ls -a xx(查看文件xx的详细属性及建立时间)
ls -l(查看文件xx的详细属性)
vi (文本编辑器)
cat xx(查看文件xx的全部内容)、more(分页查看文件xx的内容)
file xx(查看文件xx的类型)
1、新建(touch)一个名字为wenzhang的文件,查看其详细属性(ll/ls -s xx),查看建立时间。
[root@localhost ~]# touch wenzhang [root@localhost ~]# ll -s wenzhang
[root@localhost ~]# ls -s wenzhang
2、为文件添加一行内容,查看文件内容(cat)。
[root@localhost ~]# vi wenzhang
[root@localhost ~]# cat wenzhang
3、修改文件建立时间(touch xx),对比之前文件建立时间。
[root@localhost ~]# touch wenzhang [root@localhost ~]# ll -s wenzhang [root@localhost ~]# ls -s wenzhang
4、新建(touch)一个名字为hello123的文件,为文件添加多行内容,查看文件内容(more)。
[root@localhost ~]# touch hello123 [root@localhost ~]# vi hello123 [root@localhost ~]# more hello123
5、新建一个文件ruanjian,不添加任何内容。
[root@localhost ~]# touch ruanjian
6、分别查看wenzhang、hello123和ruanjian文件的文件类型。
[root@localhost ~]# ls -s wenzhang [root@localhost ~]# ls -l hello123 [root@localhost ~]# ll ruanjian
第二部分
练习linux基本命令:head -6 xx(显示文件xx前6行)
tail -3 xx(显示文件xx后3行)
ln -s xx(为文件xx建立软链接)
ln xx(为文件xx建立硬链接)
ln -l xx(查看文件xx详细属性)
ls -a xx、ll xx(查看其详细属性及建立时间)
1、显示hello123文件前6行内容。
[root@localhost ~]# head -6 hello123
2、显示hello123文件后3行内容。
[root@localhost ~]# tail -5 hello123
3、为hello123建立软链接,并命名为hellosoft,并查看hellosoft文件详细属性。
[root@localhost ~]# ln -s hello123 hellosoft
[root@locatlhost ~]# ln -l hellosoft
4、为wenzhang建立硬链接,并查看文件详细属性。
[root@localhost ~]# ln wenzhang
[root@localhost ~]# ls -l wenzhang
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 零经验选手,Compose 一天开发一款小游戏!
· 一起来玩mcp_server_sqlite,让AI帮你做增删改查!!