Linux 创建 删除 复制 重命名 文件 通配符查找文件 显示文件内容
切换至root用户,并进入root用户的主目录,以下操作一律在此目录下(提示:root用户的主目录为/root)
![](https://upload-images.jianshu.io/upload_images/5250827-79d931ff486e867d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/460)
建立lianxi目录。
![](https://upload-images.jianshu.io/upload_images/5250827-2e6fa64ff4a0172f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/621)
创建 学号.txt 文件,例如153232.txt。
![](https://upload-images.jianshu.io/upload_images/5250827-26c46fc790d89411.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/403)
列出当前目录的详细信息,并将这些信息保存到上一步创建的文件中(提示:使用>>命令将ls的运行结果输出到文件,例如ls -l >>153232.txt)
![](https://upload-images.jianshu.io/upload_images/5250827-a13f2670eac9d91e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/427)
将此文本文件复制一份到lianxi目录中
![](https://upload-images.jianshu.io/upload_images/5250827-a89bc7f2ec6a6d63.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/472)
进入lianxi目录。
在屏幕上显示该文本文件内容。
![](https://upload-images.jianshu.io/upload_images/5250827-79b73f6336f8c23d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/450)
![](https://upload-images.jianshu.io/upload_images/5250827-92477d26ccef5181.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/700)
将该文本文件改名为“txt”
![](https://upload-images.jianshu.io/upload_images/5250827-735c530196d414eb.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/449)
查找/etc/libreport目录下所有c开头的配置文件,linux下的配置文件一般以conf为扩展名,例如my.conf。实例命令 find /etc/libreport -name c*
![](https://upload-images.jianshu.io/upload_images/5250827-b6ed55d8d320484d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/562)
删除lianxi下所有文件
![](https://upload-images.jianshu.io/upload_images/5250827-6628055b560050c3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/607)
删除lianxi这个目录
![](https://upload-images.jianshu.io/upload_images/5250827-ae6c53ffc19698f2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/629)