免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 761 | 回复: 0
打印 上一主题 下一主题

linux下的mv mkdir cp tac commands [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-08-23 16:19 |只看该作者 |倒序浏览

               
               
                tac:
  tac [file]
  this command is named as an opposite for the cat command,which simply print text file to standard output.in this case,tac print the text files to standard output with lines in reverse order
  
cp:
  cp [options] file1 file2
  cp [options] file1 directory
  -f force an overwrite of existing files in destination
  -i prompt interactive before override destinations files.
  -p preserve all information.include owner,group,permission.and the timestamps.without the option,the copied file or files will have the present(现在的) date and time.default permission .owner and group
  -r or R recursively copy directories.
  -v display the name of each file verbosely before copying
  
mkdir:
  mkdir [options] directory
  frequence used parameters
   -m mode ;set the access mode for the directory
   -p ;create intervening parent directories if they don't exist
   example create a read-only directory
   mkdir -m 444 ~/ye/directories   ;the tidle(~) is shortcut for the home directory.if is the superuser root,the ~ replace the /root,
   mkdir -p ~/dir1/dir2/dir3   ;the directory dir1,dir2,dir3 is not exist before perform the command.
   
mv:
  mv [options] source target
  description:move or rename files and directory.for targets on the different filesystem,such a change can't be made,so files are copyied to the target location and the original sources are deleted.if a target file or directory does not exist.source is rename to target.
example:
mv files/file ~/home
  if the directory ~/home don't exist. it will create home at the home directory replace the file "files/file". if target is a existing directory. source is moved into that directory.
-f     force the move even the target exists,suppressint warning message
-i      query interactive before moving files


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/45689/showart_366141.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP