The Linux Command Line 读书笔记(三)操作文件和目录

Manipulating Files And Directories

Wildcards(通配符)

Commonly Used Character Classes


mkdir - Create Directories

命令格式:

mkdir directory...

表示可以同时新建多个目录

cp - Copy Files and Directories

命令格式:

the cp command copies files or directories. It can be used two different ways.


格式1:

cp item1 item2

(item1 and item2 could be file or directory.)


格式2:

cp item... directory

(to copy multiple items (either files or directories) into a directory.)


cp Options


cp examples

mv – Move And Rename Files

The mv command performs both file moving and file renaming, depending on how it is used. In either case, the original filename no longer exists after the operation. mv is used in much the same way as cp

同cp一样有两种格式。

mv Options


mv Examples

rm – Remove Files And Directories

The rm command is used to remove (delete) files and directories


格式:

rm item...

where “item” is one or more files or directories.

Useful Options And Examples

rm opitions

rm Examples

ln – Create Links

The ln command is used to create either hard or symbolic links. It is used in one of two ways


关于软链接和硬链接的用法和区别

下一篇再讲。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值