[lfs-book] [LFS Trac] #2982: Replace "uncompress" with a symlink

LFS Trac trac at linuxfromscratch.org
Wed Dec 14 10:06:04 PST 2011


#2982: Replace "uncompress" with a symlink
-----------------------+----------------------------------------------------
 Reporter:  synthehol  |       Owner:  lfs-book@…                   
     Type:  defect     |      Status:  new                          
 Priority:  normal     |   Milestone:  7.1                          
Component:  Book       |     Version:  SVN                          
 Severity:  normal     |    Keywords:  gzip, uncompress             
-----------------------+----------------------------------------------------

Comment(by bdubbs@…):

 mv does copy the file to a separate partition.

 {{{
 # echo test >a1
 # ln a1 b1
 # ls -li ?1
 291550 -rw-r--r-- 2 root root 5 Dec 14 11:57 a1
 291550 -rw-r--r-- 2 root root 5 Dec 14 11:57 b1
 # df
 Filesystem     1K-blocks    Used Available Use% Mounted on
 /dev/sda11      10325748 2111220   7690008  22% /home
 /dev/sda2        9614148 1428428   7697344  16% /opt
 # mv b1 /opt
 # ls -li ?1 /opt/?1
     12 -rw-r--r-- 1 root root 5 Dec 14 11:57 /opt/b1
 291550 -rw-r--r-- 1 root root 5 Dec 14 11:57 a1
 }}}

 In the case of a mv to a separate partition, the system does a cp and an
 rm and the hard link is severed.

-- 
Ticket URL: <http://wiki.linuxfromscratch.org/lfs/ticket/2982#comment:1>
LFS Trac <http://wiki.linuxfromscratch.org/lfs/>
Linux From Scratch: Your Distro, Your Rules.



More information about the lfs-book mailing list