![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems . |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Symbolic Links - BASH Script | rodrimuino | Shell Programming and Scripting | 4 | 09-05-2007 07:42 PM |
| Symbolic Links | rcarnesiii | AIX | 1 | 08-17-2005 11:57 AM |
| Too many levels of symbolic links | Bab00shka | UNIX for Dummies Questions & Answers | 2 | 09-19-2003 09:15 AM |
| Symbolic Links for a File | b_u_n_1234 | UNIX for Dummies Questions & Answers | 4 | 03-06-2002 09:58 AM |
| Finding symbolic links | mehtad | UNIX for Dummies Questions & Answers | 2 | 11-15-2001 03:26 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
cp a dty without symbolic links?
Hi,
- we have copy (cp command) to do to save all the contents of a dty BUT we dont want to copy the files corresponding to symbolic links contained whithin this dty - the box is a sun solaris one - and the cp commande do not say avything about that? thanks for help Jakez
__________________
JAKEZ |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Exclude the links of the list to copy :
ksh cd dty for file in $(find . ! -type l) do cp -pr $file backup_dty done In case you want a tool for backup try rsync :www.samba.org/rsync) |
|
#3
|
|||
|
|||
|
hello guy,
- thanks for replying - i tried your script but if we have a link in the dty to copy the dty which is pointed to by the link is copied also !! even when executing the cmde: "find . ! -type l" when we are in the dty to copy the link does not appear !!!! - where is the error? jakez
__________________
JAKEZ |
|
#4
|
|||
|
|||
|
Sorry I missed the first line returned by the find command (the dot)
The following code should work: ksh cd dty for file in $(ls) do [ ! -h "$file" ] && cp -pr "$file" bkp_dty done |
|
#5
|
|||
|
|||
|
Hi chap,
- the last script you gave me makes again the copy of the symbolic link (he type "l" file listed by ls - some idea for not copying the link?? thanks a lot Jakez
__________________
JAKEZ |
|
#6
|
||||
|
||||
|
..............
have a look at:
find ./ ! -follow | cpio -pdmuv /new/directory greetings pressy |
|
#7
|
|||
|
|||
|
Hi pressy,
- what do you mean with 'follow' in your cmde: find ./ ! -follow | cpio -pdmuv /new/directory thanks Jakez
__________________
JAKEZ |
|||
| Google The UNIX and Linux Forums |
| Tags |
| cpio |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|