第7章-01
2015-08-12 22:22
351 查看
Please indicate the source if you want to reprint: http://blog.csdn.net/gaoxiangnumber1
绝对路径的用途:绝对路径的正确度要比较好。一般来说,如果是在写程序 (shell scripts) 来管理系统的条件下,务必使用绝对路径的写法。因为绝对路径的写法虽然比较麻烦,但是可以肯定这个写法绝对不会有问题。 如果使用相对路径在程序当中,则可能由于你执行的工作环境不同,导致一些问题的发生。
cd :变换目录(Change Directory)
pwd :显示目前所在的目录(Print Working Directory)
-P(physical的缩写):avoid all symlinks
mkdir (make directories):建立新目录
-m(mode的缩写):set file mode (as in chmod), not a=rwx - umask
-p(parents的缩写):no error if existing, make parent directories as needed
rmdir :删除空的目录(remove empty directories)
-p(parents的缩写):remove DIRECTORY and its ancestors; e.g., ‘rmdir -p a/b/c’ is similar to ‘rmdir a/b/c a/b a’
rm -r test :递归的删除test及其里面的所有文件。
档案与目录的检视: ls
-a, –all do not ignore entries starting with
全部的档案,连同隐藏档( 开头为 . 的档案) 一起列出来
-l use a long listing format
长数据串行出,包含档案的属性和权限等等数据
-R, –recursive list subdirectories recursively
连同子目录内容一起列出来,等于该目录下的所有档案都会显示出来
复制文件:cp.
[-options]中可以同时出现多个字母选项。
-a, –archive same as -dR –preserve=all
–preserve[=ATTR_LIST] preserve the specified attributes (default: mode, ownership, timestamps), if possible additional attributes: context, links, xattr, all
-i, –interactive prompt before overwrite (overrides a previous -n option)
-p same as –preserve=mode,ownership,timestamps
-R, -r, –recursive copy directories recursively
rm (remove files or directories):移除档案或目录
Please indicate the source if you want to reprint: http://blog.csdn.net/gaoxiangnumber1
绝对路径的用途:绝对路径的正确度要比较好。一般来说,如果是在写程序 (shell scripts) 来管理系统的条件下,务必使用绝对路径的写法。因为绝对路径的写法虽然比较麻烦,但是可以肯定这个写法绝对不会有问题。 如果使用相对路径在程序当中,则可能由于你执行的工作环境不同,导致一些问题的发生。
cd :变换目录(Change Directory)
pwd :显示目前所在的目录(Print Working Directory)
-P(physical的缩写):avoid all symlinks
mkdir (make directories):建立新目录
-m(mode的缩写):set file mode (as in chmod), not a=rwx - umask
-p(parents的缩写):no error if existing, make parent directories as needed
rmdir :删除空的目录(remove empty directories)
-p(parents的缩写):remove DIRECTORY and its ancestors; e.g., ‘rmdir -p a/b/c’ is similar to ‘rmdir a/b/c a/b a’
rm -r test :递归的删除test及其里面的所有文件。
档案与目录的检视: ls
-a, –all do not ignore entries starting with
全部的档案,连同隐藏档( 开头为 . 的档案) 一起列出来
-l use a long listing format
长数据串行出,包含档案的属性和权限等等数据
-R, –recursive list subdirectories recursively
连同子目录内容一起列出来,等于该目录下的所有档案都会显示出来
复制文件:cp.
[-options]中可以同时出现多个字母选项。
-a, –archive same as -dR –preserve=all
–preserve[=ATTR_LIST] preserve the specified attributes (default: mode, ownership, timestamps), if possible additional attributes: context, links, xattr, all
-i, –interactive prompt before overwrite (overrides a previous -n option)
-p same as –preserve=mode,ownership,timestamps
-R, -r, –recursive copy directories recursively
rm (remove files or directories):移除档案或目录
Please indicate the source if you want to reprint: http://blog.csdn.net/gaoxiangnumber1
相关文章推荐
- solr学习
- Android 蓝牙低功耗Ble Gatt浅谈
- Lua1
- css图片响应式+垂直水平居中1
- 《清明上河图密码》:北宋的福尔摩斯探案,五星
- PXE网络装机配置和kickstart 无人值守安装
- NSDate和NSString相互转换
- 从今天起,做个挖渠人
- 第一课 MongoDB 概述与安装
- 从今天起,做个挖渠人
- 面试题:(1)关于fork的问题
- 【一些事晚报】在线直播平台成下一个快播?
- Error Adding New Node To Rac Database
- hdu 1297 Children’s Queue(递推和高精)
- Java异常体系结构
- Java异常处理和设计
- Intersection of Two Linked Lists
- 在c++中可以调用java中的方法,从而实现java与c++的的交互。
- 1056. Mice and Rice (25)
- hdu3374