linux下man命令详解,以命令"cp"为例
[root@rhel6-5 dir]# man cp
重点是括号里面的数字
如何用快捷键看文档:
向下键向下移一行
向上键向上移一行
空白键向下翻一页
/string 向下找string这个字符串,比如,想搜索copy,就输入它
?string 向上找string这个字符串
配合n(向下查询)、N(向上查询)
[Page Down] 向下翻一页
[Page Up] 向上翻一页
[Home] 到第一页
[End] 到最后一页
Q 结束
CP(1) UserCommands CP(1)
NAME ==>命令的名字和它的意思
cp - copy files and directories
SYNOPSIS ==>语法
cp [OPTION]... [-T] SOURCE DEST
cp [OPTION]... SOURCE... DIRECTORY
cp [OPTION]... -t DIRECTORY SOURCE...
DESCRIPTION ==>详细描述语法参数使用方法
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
Mandatory arguments to long options are mandatory for short options too.
-a, --archive
same as -dR --preserve=all
--backup[=CONTROL]
make a backup of eachexisting destination file
-b like --backup but does notaccept an argument
--copy-contents
copy contents of special fileswhen recursive
-d same as --no-dereference--preserve=link
-f, --force
if an existing destination filecannot be opened, remove it and try again
-i, --interactive
prompt before overwrite
-H follow command-linesymbolic links
-l, --link
link files instead of copying
-L, --dereference
always follow symbolic links
-P, --no-dereference
never follow symbolic links
-p same as--preserve=mode,ownership,timestamps
--preserve[=ATTR_LIST]
preserve the specified attributes (default:mode,ownership,timestamps), if possible additional
attributes: context, links,xattr, all
-c same as --preserve=context
--no-preserve=ATTR_LIST
don’t preserve the specifiedattributes
--parents
use full source file name underDIRECTORY
-R, -r, --recursive
copy directories recursively
--remove-destination
remove each existing destinationfile before attempting to open it (contrast with --force)
--sparse=WHEN
control creation of sparse files
--strip-trailing-slashes remove any trailing slashes from each SOURCE
argument
-s, --symbolic-link
make symbolic links instead ofcopying
-S, --suffix=SUFFIX
override the usual backup suffix
-t, --target-directory=DIRECTORY
copy all SOURCE arguments intoDIRECTORY
-T, --no-target-directory
treat DEST as a normal file
-u, --update
copy only when the SOURCE file isnewer than the destination file or when the destination file
is missing
-v, --verbose
explain what is being done
-x, --one-file-system
stay on this file system
-Z, --context=CONTEXT
set security context of copy toCONTEXT
--help display this help and exit
--version
output version information andexit
--version
output version information andexit
-x, --one-file-system
stay on this file system
-Z, --context=CONTEXT
set security context of copy toCONTEXT
--help display this help and exit
--version
output version information andexit
By default, sparse SOURCE files are detected by a crudeheuristic and the corresponding DEST file is
made sparse as well. That is the behavior selected by--sparse=auto. Specify --sparse=alwaysto cre-
ate a sparse DEST file whenever the SOURCE file contains a long enough sequence ofzero bytes. Use
--sparse=never to inhibit creation of sparse files.
The backup suffix is ‘~’, unless set with --suffix or SIMPLE_BACKUP_SUFFIX. The version control
method may be selected via the --backup option or through the VERSION_CONTROLenvironment variable.
Here are the values:
none, off
never make backups (even if--backup is given)
numbered, t
make numbered backups
existing, nil
numbered if numbered backupsexist, simple otherwise
simple, never
always make simple backups
As a special case, cp makes a backup of SOURCE when the force and backupoptions are given and SOURCE
and DEST are the same name for an existing, regular file.
AUTHOR ==>作者
Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.
REPORTING BUGS ==>联系方式(可以骚扰骚扰奥!)
Report bugs to
COPYRIGHT ==>版权声明
Copyright © 2006 Free Software Foundation, Inc.
This is free software. You may redistributecopies of it under the terms of the GNU General Public
License
SEE ALSO ==>详细文件可以从哪里查询到
The full documentation for cp is maintained as a Texinfo manual. If the info and cp programs are
properly installed at your site, the command
info cp
should give you access to the complete manual.
cp 5.97 February 2010 CP(1)
想知道cp(1)代表什么意思么?哈哈哈!我来告诉你。
1.代表可以执行的命令
2.系统可调用的函数
3.库函数
4.设备文件说明
5.配置文件或某些文件的格式
6.游戏文件
7.附件加一些变量
8.系统管理员用的命令
是不是已经晕了?嘿嘿,教你两招!
用man -f man whatis man命令来查看系统中还有哪些跟man这个指令有关的说明文件
用man -k man 或者apropos man 命令来查看系统中有哪些文档含有man这个字眼
[root@rhel6-5 dir]# man -f cp
cp (1) - copy files and directories
cp (1p) - copy files