[root@szm Desktop]# mkdir --help
[root@szm ~]# wc --help
Usage: wc [OPTION]... [FILE]...
or: wc [OPTION]... --files0-from=F
Print newline, word, and byte counts for each FILE, and a total line if
more than one FILE is specified. With no FILE, or when FILE is -,
read standard input.
-c, --bytes print the byte counts
-m, --chars print the character counts
-l, --lines print the newline counts
--files0-from=F read input from the files specified by
NUL-terminated names in file F;
If F is - then read names from standard input
-L, --max-line-length print the length of the longest line
-w, --words print the word counts
--help display this help and exit
--version output version information and exit
Report wc bugs to [email protected]
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
For complete documentation, run: info coreutils 'wc invocation'
a:增加指定文件的内容
c:取代指定文件的内容
d:删除指定文件的内容
i:插入指定文件的内容
s:取代指定文件的内容
[root@szm ~]# patch --help
Usage: patch [OPTION]... [ORIGFILE [PATCHFILE]]
Input options:
-p NUM --strip=NUM Strip NUM leading components from file names.
-F LINES --fuzz LINES Set the fuzz factor to LINES for inexact matching.
-l --ignore-whitespace Ignore white space changes between patch and input.
-c --context Interpret the patch as a context difference.
-e --ed Interpret the patch as an ed script.
-n --normal Interpret the patch as a normal difference.
-u --unified Interpret the patch as a unified difference.
-N --forward Ignore patches that appear to be reversed or already applied.
-R --reverse Assume patches were created with old and new files swapped.
-i PATCHFILE --input=PATCHFILE Read patch from PATCHFILE instead of stdin.
Output options:
-o FILE --output=FILE Output patched files to FILE.
-r FILE --reject-file=FILE Output rejects to FILE.
-D NAME --ifdef=NAME Make merged if-then-else output using NAME.
-m --merge Merge using conflict markers instead of creating reject files.
-E --remove-empty-files Remove output files that are empty after patching.
-Z --set-utc Set times of patched files, assuming diff uses UTC (GMT).
-T --set-time Likewise, assuming local time.
--quoting-style=WORD output file names using quoting style WORD.
Valid WORDs are: literal, shell, shell-always, c, escape.
Default is taken from QUOTING_STYLE env variable, or 'shell' if unset.
Backup and version control options:
-b --backup Back up the original contents of each file.
--backup-if-mismatch Back up if the patch does not match exactly.
--no-backup-if-mismatch Back up mismatches only if otherwise requested.
-V STYLE --version-control=STYLE Use STYLE version control.
STYLE is either 'simple', 'numbered', or 'existing'.
-B PREFIX --prefix=PREFIX Prepend PREFIX to backup file names.
-Y PREFIX --basename-prefix=PREFIX Prepend PREFIX to backup file basenames.
-z SUFFIX --suffix=SUFFIX Append SUFFIX to backup file names.
-g NUM --get=NUM Get files from RCS etc. if positive; ask if negative.
Miscellaneous options:
-t --batch Ask no questions; skip bad-Prereq patches; assume reversed.
-f --force Like -t, but ignore bad-Prereq patches, and assume unreversed.
-s --quiet --silent Work silently unless an error occurs.
--verbose Output extra information about the work being done.
--dry-run Do not actually change any files; just print what would happen.
--posix Conform to the POSIX standard.
-d DIR --directory=DIR Change the working directory to DIR first.
--reject-format=FORMAT Create 'context' or 'unified' rejects.
--binary Read and write data in binary mode.
-v --version Output version info.
--help Output this help.
Report bugs to <[email protected]>.
[root@szm szm]# sort --help
Usage: sort [OPTION]... [FILE]...
or: sort [OPTION]... --files0-from=F
Write sorted concatenation of all FILE(s) to standard output.
Mandatory arguments to long options are mandatory for short options too.
Ordering options:
-b, --ignore-leading-blanks ignore leading blanks----忽略顶行空格
-d, --dictionary-order consider only blanks and alphanumeric characters
-f, --ignore-case fold lower case to upper case characters----忽略大小写
-g, --general-numeric-sort compare according to general numerical value
-i, --ignore-nonprinting consider only printable characters
-M, --month-sort compare (unknown) < `JAN' < ... < `DEC'----月排序
-h, --human-numeric-sort compare human readable numbers (e.g., 2K 1G)
-n, --numeric-sort compare according to string numerical value----数字排序
-R, --random-sort sort by random hash of keys
--random-source=FILE get random bytes from FILE
-r, --reverse reverse the result of comparisons-----反向排序
--sort=WORD sort according to WORD:
general-numeric -g, human-numeric -h, month -M,
numeric -n, random -R, version -V
-V, --version-sort natural sort of (version) numbers within text
Other options:
--batch-size=NMERGE merge at most NMERGE inputs at once;
for more use temp files
-c, --check, --check=diagnose-first check for sorted input; do not sort
-C, --check=quiet, --check=silent like -c, but do not report first bad line
--compress-program=PROG compress temporaries with PROG;
decompress them with PROG -d
--files0-from=F read input from the files specified by
NUL-terminated names in file F;
If F is - then read names from standard input
-k, --key=POS1[,POS2] start a key at POS1 (origin 1), end it at POS2
(default end of line)-----具体字段排序
-m, --merge merge already sorted files; do not sort
-o, --output=FILE write result to FILE instead of standard output
-s, --stable stabilize sort by disabling last-resort comparison
-S, --buffer-size=SIZE use SIZE for main memory buffer
-t, --field-separator=SEP use SEP instead of non-blank to blank transition--分隔符
-T, --temporary-directory=DIR use DIR for temporaries, not $TMPDIR or /tmp;
multiple options specify multiple directories
-u, --unique with -c, check for strict ordering;------结果不重复
without -c, output only the first of an equal run
-z, --zero-terminated end lines with 0 byte, not newline
--help display this help and exit
--version output version information and exit
POS is F[.C][OPTS], where F is the field number and C the character position
in the field; both are origin 1. If neither -t nor -b is in effect, characters
in a field are counted from the beginning of the preceding whitespace. OPTS is
one or more single-letter ordering options, which override global ordering
options for that key. If no key is given, use the entire line as the key.
SIZE may be followed by the following multiplicative suffixes:
% 1% of memory, b 1, K 1024 (default), and so on for M, G, T, P, E, Z, Y.
With no FILE, or when FILE is -, read standard input.
*** WARNING ***
The locale specified by the environment affects sort order.
Set LC_ALL=C to get the traditional sort order that uses
native byte values.
Report sort bugs to [email protected]
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
For complete documentation, run: info coreutils 'sort invocation'
[root@szm szm]# yum install aspell
[root@szm szm]# aspell -c aspellword.txt -----------------单词拼写检查
[root@szm szm]# sed --help
Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...
-n, --quiet, --silent
suppress automatic printing of pattern space
-e script, --script< /span>
add the script to the commands to be executed
-f script-file, --file=script-file
add the contents of script-file to the commands to be executed
--follow-symlinks
follow symlinks when processing in place; hard links
will still be broken.
-i[SUFFIX], --in-place[=SUFFIX]
edit files in place (makes backup if extension supplied).
The default operation mode is to break symbolic and hard links.
This can be changed with --follow-symlinks and --copy.
-c, --copy
use copy instead of rename when shuffling files in -i mode.
While this will avoid breaking links (symbolic or hard), the
resulting editing operation is not atomic. This is rarely
the desired mode; --follow-symlinks is usually enough, and
it is both faster and more secure.
-l N, --line-length=N
specify the desired line-wrap length for the `l' command
--posix
disable all GNU extensions.
-r, --regexp-extended
use extended regular expressions in the script.
-s, --separate
consider files as separate rather than as a single continuous
long stream.
-u, --unbuffered
load minimal amounts of data from the input files and flush
the output buffers more often
--help display this help and exit
--version output version information and exit
If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret. All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.
GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
E-mail bug reports to: <[email protected]>.
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
新增:a
替换:c
删除:d
插入:i
输出:p
查找与替换:s
|
管理员umask:022
普通用户umask:002
|
硬盘主引导分区:446字节 分区表:16*4字节 2字节55AA
IDE最多63个分区;SCSI最多15个分区
|
系统会为每一个新建的目录分配一个4096大小的块用于存放文件或目录,在这个4096大小的数据快中,最多只能存放256目录或文件,当目录中的文件数量超过256时,系统会自动以整数位放大目录所需要的数据块大小。 |
注意:
ext3文件系统中,开发人员专门划分出一块专用的空间来存放发生变化的源数据(Metadata),目的就是为了防止文件系统发生意外后,检查与修复过程无需对整个文件系统中的所有数据,面只需要检查这块用于存放数据发生变化的记录中的信息,从而大大提高了文件系统的修复速度与安全性。
|
文件名称是从Inode中分离出来的,在Ext2和Ext3中是这样的 硬链接文件不能跨文件系统,也不能对目录创建硬连接,硬链接不占用空间 |
扩展分区ID号一般为5 |
[root@szm inode]# fdisk --help
fdisk: invalid option -- '-'
Usage:
fdisk [options] <disk> change partition table
fdisk [options] -l <disk> list partition table(s)
fdisk -s <partition> give partition size(s) in blocks
Options:
-b <size> sector size (512, 1024, 2048 or 4096)
-c switch off DOS-compatible mode
-h print help
-u <size> give sizes in sectors instead of cylinders--扇区代替柱面号
-v print version
-C <number> specify the number of cylinders
-H <number> specify the number of heads
-S <number> specify the number of sectors per track
[root@szm fdisk]# mkfs --help
mkfs.ext2: invalid option -- '-'
Usage: mkfs.ext2 [-c|-l filename] [-b block-size] [-f fragment-size]
[-i bytes-per-inode] [-I inode-size] [-J journal-options]
[-G meta group size] [-N number-of-inodes]
[-m reserved-blocks-percentage]--保留块比率 [-o creator-os]
[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]
[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]
[-T fs-type] [-U UUID] [-jnqvFKSV] device [blocks-count]
Group 0: (Blocks 1-8192) [ITABLE_ZEROED]
Checksum 0xd0ce, unused inodes 2003
Primary superblock at 1, Group descriptors at 2-3--------超级块及组描述信息位置
Reserved GDT blocks at 4-259
Block bitmap at 260 (+259), Inode bitmap at 276 (+275)----块与Inode位图位置
Inode table at 292-545 (+291)-----------------------------Inode索引表位置
3810 free blocks, 2003 free inodes, 2 directories, 2003 unused inodes
Free blocks: 4383-8192
Free inodes: 30-2032
Group 1: (Blocks 8193-16384) [INODE_UNINIT, ITABLE_ZEROED]
Checksum 0xa17b, unused inodes 2032
Backup superblock at 8193, Group descriptors at 8194-8195
Reserved GDT blocks at 8196-8451
Block bitmap at 261, Inode bitmap at 277
Inode table at 546-799
1822 free blocks, 2032 free inodes, 0 directories, 2032 unused inodes
Free blocks: 10169-10240, 12756-14336, 16216-16384
Free inodes: 2033-4064
Group 2: (Blocks 16385-24576) [INODE_UNINIT, ITABLE_ZEROED]
Checksum 0x7a1a, unused inodes 2032
Block bitmap at 262, Inode bitmap at 278
Inode table at 800-1053
615 free blocks, 2032 free inodes, 0 directories, 2032 unused inodes
Free blocks: 18188-18432, 22159-22528
Free inodes: 4065-6096
Group 3: (Blocks 24577-32768) [INODE_UNINIT, ITABLE_ZEROED]
Checksum 0x2284, unused inodes 2032
Backup superblock at 24577, Group descriptors at 24578-24579
Reserved GDT blocks at 24580-24835
Block bitmap at 263, Inode bitmap at 279
Inode table at 1054-1307
1789 free blocks, 2032 free inodes, 0 directories, 2032 unused inodes
Free blocks: 24836-26624
Free inodes: 6097-8128
文件系统一旦创建,很多关键参数就不能再更改了,如Inode节点的数量,Block块的大小,SuperBlock,BlockGroup,Inode Size等都会固定下来。使用Tune2fs可以修改一定的参数。 |