lucheng918的个人博客分享 http://blog.sciencenet.cn/u/lucheng918

博文

shell mv rm mkdir

已有 3769 次阅读 2014-2-17 15:11 |个人分类:linux+oracle|系统分类:科研笔记

shell是Linux中用于翻译用户输入的命令的外壳程序

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




https://wap.sciencenet.cn/blog-780964-768309.html

上一篇:shell正则表达式
下一篇:linux sed总结
收藏 IP: 168.160.22.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-6-3 17:52

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部