Home | Mirror | Search

第 23 章 Directory and File System Related

目錄

1. dirname
2. filename
2.1. 排除副檔名
2.2. 取副檔名
3. test - check file types and compare values
4. stat
5. mkdir - make directories
6. rename
7. touch
8. ls - list directory contents
9. cp - copy files and directories
9.1. copy directories recursively
9.2. overwrite an existing file
10. rm - remove files or directories
10.1. -bash: /bin/rm: Argument list too long
10.2. zsh: sure you want to delete all the files in /tmp [yn]?
11. df - report file system disk space usage
12. du - estimate file space usage
13. tac - concatenate and print files in reverse
14. find - search for files in a directory hierarchy
14.1. name
14.2. regex
14.3. user
14.4. perm
14.5. type
14.5.1. 分別設置檔案與目錄的權限
14.6. -delete
14.7. exec
14.8. xargs
14.9. 排除目錄
14.10. -mtime / -mmin
14.11. --newer
14.12. -print / -printf

1. dirname

$ dirname /usr/bin/find
/usr/bin
    	
comments powered by Disqus