64、shell命令,mv,rm,mkdir

本文详细介绍了Linux中用于文件移动、删除、目录创建及删除的命令,包括mv、rm、mkdir和rmdir的基本用法、选项及应用场景。

1、mv

1)mv- move (rename) files

mv [OPTION] source dest

mv [OPTION]... SOURCE... DIRECTORY

Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.

2)选项

-f, do not prompt before overwriting

-i, prompt before overwrite

-n, --no-clobber do not overwrite an existing file

If you specify more than one of -i, -f, -n, only the final one takes effect.

-u, --update move only when the SOURCE file is newer than the destination file or when the destination file is missing

-v, --verbose explain what is being done

2、rm

1)rm - removes each specified file. By default, it does not remove directories.

rm - remove files or directories

rm [OPTION]... FILE...

2)选项

-f, ignore nonexistent files, never prompt

-i prompt before every removal

-r, remove directories and their contents recursively

-v, explain what is being done

3、mkdir

1)mkdir - make directories

mkdir [OPTION]... DIRECTORY...

2)OPTION

-m, set file mode (as in chmod), not a=rwx - umask

-p, no error if existing, make parent directories as needed

-v, print a message for each created directory

4、rmdir

参考

1man手册

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值