Home | 简体中文 | 繁体中文 | 杂文 | Search | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎专栏 | Email

第 3 章 Shell command

目录

3.1. Help Commands
3.1.1. man - an interface to the on-line reference manuals
3.1.1.1. manpath.config
3.1.1.2. 查看man手册位置
3.1.1.3. 指定手册位置
3.2. getconf - Query system configuration variables
3.3. Directory and File System Related
3.3.1. dirname
3.3.2. filename
3.3.2.1. 排除扩展名
3.3.2.2. 取扩展名
3.3.3. test - check file types and compare values
3.3.4. stat
3.3.5. mkdir - make directories
3.3.6. rename
3.3.7. touch
3.3.8. ls - list directory contents
3.3.8.1. full-time / time-style 定义日期时间格式
3.3.9. cp - copy files and directories
3.3.9.1. copy directories recursively
3.3.9.2. overwrite an existing file
3.3.9.3. -a, --archive same as -dR --preserve=all
3.3.10. rm - remove files or directories
3.3.10.1. -bash: /bin/rm: Argument list too long
3.3.10.2. zsh: sure you want to delete all the files in /tmp [yn]?
3.3.11. df - report file system disk space usage
3.3.12. du - estimate file space usage
3.3.13. tac - concatenate and print files in reverse
3.3.14. split - split a file into pieces
3.3.14.1. 按行分割文件
3.3.14.2. 按尺寸分割文件
3.3.15. find - search for files in a directory hierarchy
3.3.15.1. name
3.3.15.2. regex
3.3.15.3. user
3.3.15.4. perm
3.3.15.5. type
3.3.15.6. -delete
3.3.15.7. exec
3.3.15.8. xargs
3.3.15.9. 排除目录
3.3.15.10. -mmin n File's data was last modified n minutes ago.
3.3.15.11. -mtime / -mmin
3.3.15.12. --newer
3.3.15.13. -print / -printf
3.3.15.14. -size
3.4. package / compress and decompress
3.4.1. tar — The GNU version of the tar archiving utility
3.4.1.1. tar examples
3.4.1.2. gunzip
3.4.1.3. b2zip
3.4.1.4. compress
3.4.1.5. -t, --list
3.4.1.6. tar: Removing leading `/’ from member names
3.4.1.7. -C, --directory=DIR
3.4.1.8. -P, --absolute-names don't strip leading `/'s from file names
3.4.1.9. --exclude
3.4.1.10. -T
3.4.1.11. 日期过滤
3.4.1.12. 保留权限
3.4.1.13. -r, --append
3.4.1.14. 远程传输
3.4.1.15. 分卷压缩
3.4.2. cpio - copy files to and from archives
3.4.3. gzip
3.4.4. zip, zipcloak, zipnote, zipsplit - package and compress (archive) files
3.4.5. RAR
3.4.6. 7-Zip
3.4.6.1. 压缩
3.4.6.2. 浏览压缩包
3.4.6.3. 解压
3.4.6.4. Creates self extracting archive.
3.5. date and time
3.5.1. 日期格式
3.5.2. -d --date=
3.5.2.1. 日期偏移量
3.5.2.2. 时间偏移
3.5.3. weekday name
3.5.4. UTC
3.6. Numeric
3.6.1. 数值运算
3.6.2. seq - print a sequence of numbers
3.6.3. bc - An arbitrary precision calculator language
3.7. Text Processing
3.7.1. iconv - Convert encoding of given files from one encoding to another
3.7.1.1. cconv - A iconv based simplified-traditional chinese conversion tool
3.7.1.2. uconv - convert data from one encoding to another
3.7.2. 字符串处理命令expr
3.7.3. cat - concatenate files and print on the standard output
3.7.3.1. -s, --squeeze-blank suppress repeated empty output lines
3.7.4. nl - number lines of files
3.7.5. od - dump files in octal and other formats
3.7.5.1. 16进制
3.7.6. tr - translate or delete characters
3.7.7. cut - remove sections from each line of files
3.7.8. printf - format and print data
3.7.9. Free `recode' converts files between various character sets and surfaces.
3.7.10. /dev/urandom 随机字符串
3.7.11. col - filter reverse line feeds from input
3.7.12. apg - generates several random passwords
3.7.13. head/tail
3.7.14. 反转字符串或文件内容
3.8. grep, egrep, fgrep, rgrep - print lines matching a pattern
3.8.1. 删除空行
3.8.2. -v, --invert-match
3.8.3. Output control
3.8.3.1. -o, --only-matching show only the part of a line matching PATTERN
3.8.3.2. 递归操作
3.8.3.3. -c, --count print only a count of matching lines per FILE
3.8.4. Context control
3.8.4.1. -A, --after-context=NUM print NUM lines of trailing context
3.8.4.2. -B, --before-context=NUM print NUM lines of leading context
3.8.4.3. -C, --context=NUM print NUM lines of output context
3.8.4.4. --color
3.8.5. Regexp selection and interpretation
3.8.5.1. .*
3.8.5.2. 2010:(13|14|15|16)
3.8.5.3. []与{}
3.8.5.4. -P, --perl-regexp Perl正则表达式
3.8.6. fgrep
3.8.7. egrep
3.9. sort - sort lines of text files
3.9.1. 对列排序
3.10. uniq
3.11. 表格操作/行列转换
3.11.1. column - columnate lists
3.11.2. paste - merge lines of files
3.12. standard input/output
3.12.1. xargs - build and execute command lines from standard input
3.12.1.1. 格式化
3.12.1.2. standard input
3.12.1.3. -I 替换操作
3.13. Logging
3.13.1. logger - a shell command interface to the syslog(3) system log module
3.14. Password
3.14.1. Shadow password suite configuration.
3.14.2. newusers - update and create new users in batch
3.14.3. chpasswd - update passwords in batch mode
3.15. binutils
3.15.1. strings - print the strings of printable characters in files.

3.1. Help Commands

3.1.1. man - an interface to the on-line reference manuals

3.1.1.1. manpath.config

cat /etc/manpath.config
			

3.1.1.2. 查看man手册位置

$ man -aw ls
/usr/share/man/man1/ls.1.gz
			

3.1.1.3. 指定手册位置

man -M /home/mysql/man mysql
			
comments powered by Disqus