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?
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 !!!!
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
FOLLOW is a parameter of the find programm, it says that you FOLLOW the links, it is always set to true. so you need the "!". it negates the parameter, so " ! -follow" means: do not follow links...