Dereferencing links

Steven W. Orr steveo at syslang.net
Fri Apr 8 13:26:00 EDT 2005


On Friday, Apr 8th 2005 at 10:48 -0400, quoth Jim Kuzdrall:

=>    Is there a command line function to collapse a group of symbolic 
=>links, replacing them with the files they reference?
=>
=>    I tried: (cd /dir1 ; tar cf - .) | (cd /dir2 ; tar xf -)
=>
=>    But, it copied the files as links.  It is not too hard to write a 
=>script to do it, but all too often I discover something already exists.
=>
=>Jim Kuzdrall

Not what you're looking for, but this is the exact opposite:

find dir1 -print | cpio -pdvlum dir2

This will create hardlinks within a filesystem.

-- 
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net



More information about the gnhlug-discuss mailing list