码迷,mamicode.com
首页 > 其他好文 > 详细

Unix command 积累

时间:2014-08-08 01:32:44      阅读:353      评论:0      收藏:0      [点我收藏+]

标签:style   http   color   io   strong   文件   for   ar   

1,basename, 当向basename传递一个路径名时,它会删除任何前缀,直到最后一个斜线(‘/‘)字符,然后返回结果。

$ basename /home/jsmith/base.wiki 
base.wiki

2,
symbolic link
就是一个已有文件的别名
In computing, a symbolic link (also symlink or soft link) is a special type of file that contains a reference to another file or directory in the form of an absolute or relative path. Programs that read or write to files named by a symbolic link will behave as if operating directly on the target file.
ln -s target_path link_path
3, Hard links always refer to an existing file.
A file in the file system is basically a link to an inode.
A hard link then just creates another file with a link to the same underlying inode.
deleting renaming or moving the original file will not affect the hard link as it links to the underlying inode. Any changes to the data on the inode is reflected in all files that refer to that inode.

$ ln /tmp/file link-here


Unix command 积累,布布扣,bubuko.com

Unix command 积累

标签:style   http   color   io   strong   文件   for   ar   

原文地址:http://www.cnblogs.com/chayu3/p/3898221.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!