Jul 22

链接linux的文件系统文件系统

Posted by liuxu at 14:41 | 电脑教程 | 评论(0) | 阅读(19) | 转自 本站原创 | |
链接  文件  备份  选项  方法  符号  消息  数字  变量  格局  空文  目次  手段  名字  版本  情况  有的  别的  平安  镇长  后缀  差错  软体  分歧  分区  指令  脚本  索引  言语  道路  有效  参数  用户  系统
linuxDe∴Wen∴Jian∴Xi∴Tong第叁章
Linux下的压缩文件有ZIP!TGZTBZBZ2等格局!系统文件CONF!LOOCK和RPM文件的软体包!编程和脚本言语则有CPP OPLSO和SH等文件格局
文件的连接
正在Linux下完成文件的连接!实在就是别的给文件起壹个名字!授予新名字访问权限!以完成消息共享平安控制
Linux下使用ln指令创立链接!能够创立两种方法的链接软链接和硬链接默许创立的连接是硬连接
rootlocalhost  ln --help
Usage: ln OPTION... -T TARGET LINK_NAME    
or:ln OPTION... TARGET                  
or:ln OPTION... TARGET... DIRECTORY      
or:ln OPTION... -t DIRECTORY TARGET...
In the 1st form! create a link to TARGET with the name LINK_NAME.
In the 2nd form! create a link to TARGET in the current directory.
In the 3rd and 4th forms! create links to each TARGET in DIRECTORY.
Create hard links by default! symbolic links with --symbolic.
When creating hard links! each TARGET must exist.
长选项必须用的参数正在使用短选项时也是必须的
--backup=CONTROL      make a backup of each existing destination file
-b                          like --backup but does not accept an argument
-d! -F! --directory         allow the superuser to attempt to hard link
directories  
-f! --force                 remove existing destination files
-n! --no-dereference        假设手段地是壹个链接至某目次的符号链接!会将
该符号链接当作一般文件处理!先将该已具有的
链接备份或者增除
-i! --interactive           确承认否增除手段地文件
-s! --symbolic              创立符号链接而不是硬链接
-S! --suffix=SUFFIX         override the usual backup suffix
-t! --target-directory=DIRECTORYspecify the DIRECTORY in which to create
the links
-T! --no-target-directory   treat LINK_NAME as a normal file
-v! --verbose               print name of each file before linking
--help     浮现此辅佐消息并参与
--version输进版本消息并参与
备份文件的后缀为""!除非以 --suffix 选项或者是 SIMPLE_BACKUP_SUFFIX
情况变量指定版本控制的方法可透过 --backup 选项或者 VERSION_CONTROL 情况
变量来挑选以下是可用的变量值
none! off       不会停止备份  
numbered! t     备份文件会加上数字
existing! nil   如有数字的备份文件曾经具有则使用数字!不然使用一般方法备份
simple! never   永久使用一般方法备份
请向 lt。bug-coreutilsgnu.orggt。 演讲差错
l        硬连接
经过索引点停止的连接就是硬链接答应壹个文件具有多个有效道路名!用户能够正在主要文件建立硬连接!以防止误增只要增除壹切连接以后!文件才会被镇长增除
l        软链接能够位于分歧的分区
rootlocalhost  touch file   新建壹个空文件
rootlocalhost  ln file hfile    为file创立壹个硬链接
rootlocalhost  ln -s file sfile为file创立壹个软链接
rootlocalhost  ls  lia      
合计 332
1712961 drwxr-x--- 22 root root4096 01-09 11:31 .
2 drwxr-xr-x 25 root root4096 01-09 11:14 ..
1712969 -rw-------1 root root1204 12-30 00:25 anaconda-ks.cfg
1713036 -rw-------1 root root 12351 01-07 14:07 .bash_history
1712964 -rw-r--r--1 root root    24 2006-07-13 .bash_logout
1712965 -rw-r--r--1 root root   191 2006-07-13 .bash_profile
1712966 -rw-r--r--1 root root   176 2006-07-13 .bashrc
1712995 drwx------2 root root4096 12-30 00:29 .chewing
1713095 drwx------3 root root4096 01-02 14:22 .config
1712967 -rw-r--r--1 root root   100 2006-07-13 .cshrc
1712998 drwxr-xr-x3 root root4096 01-04 15:52 Desktop
1712975 -rw-------1 root root    26 12-30 00:29 .dmrc
1713001 drwxr-x---2 root root4096 12-30 00:29 .eggcups
1713225 drwx------2 root root4096 01-07 14:07 .elinks
1713119 -rw-------1 root root    16 12-31 15:40 .esd_auth
1713244 -rw-r--r--2 root root     0 01-09 11:31 file
1712970 drwx------4 root root4096 01-09 11:27 .gconf
1712971 drwx------2 root root4096 01-09 11:28 .gconfd
1713004 drwxr-xr-x3 root root4096 12-30 00:29 .gnome


第叁章 Linux下的压缩文件有ZIP!TGZTBZBZ2等格局!系统文件CONF!LOOCK和RPM文件的软体包!编程和脚本言语则有
刘旭 ' blog  http://www.liuxu.info
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]