Linux命令第三次

1、在/tmp目录下,新建目录director新建三个txt文件,分别命名为filel、file2、file3,

用vi编辑器分别在三个文件中输入内容。

cd /tmp

mkdir director

cd director

touch filel.txt

vi filel.txt

输入想输入的内容

Ecs

: wq

touch file2.txt

vi file2.txt

i

输入想输入的内容

Ecs

:wq

touch file3.txt

vì file3.txt
2、将filel/file2/file3三个文件中内容合并到一个文件中命名为filetest.txt
cat file1.text file2.text file3.text>filetext.txt
3、在director目录下新建一个open目录,并在open目录下创建openfile,
所有目录权限r-xr-r。
mkdir open
chmod 544 open
mkdir openfile
chmod 544 openfile
4,将filetest.txt文件备份到/root下,并将/tmp/director目录移动到/usr中。
cp /tmp/director/filetext.txt /root
cd tmp
mv director /usr

5,将open目录及其子目录和文件删除。

cd usr

cd director

rm -fr open

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值