首页 > 其他 > 详细

Unix command 积累

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

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 积累

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!