>I know that i can ignore that file but my script which copy that folder
>sending me mail with error information - and I want to repair thet then
>I have good diagnostic information and i don't copy only that one file
>which i specified in my post "cgisock" - you have right this file that
>is socket. How can I copy that folder and don't copy only that one file
>"cgisock". I can't ignore them i must to have realy information about
>copying that folders and files. I ask you "cp: command give me result
>which I want? Please of our help beacause i dont't know what can i do
>in that situation??
the cp command does *NOT* have an option to let you specify filenames
that are not to be copied.
You have several choices:
1) build a list of all the names that you _do_ want copied, and
tell cp to copy _those_ files
2) use some _other_ command to do the copying -- one which _does_
support 'excluding' named files.
3) use a loop in your script that:
a) iterates for _every_ named file in the directory
b) checks to see if the current name is 'cgisock' and if so,
merely skips to the next name to be checked.
c) if the file is not named 'cgisock' ,then the file is copied
to the destination.
Lastly, you can just use 'cp', as is, and 'edit out' the error message
about 'cgisock' _before_ the email is sent. Something like:
cp {{from}} {{to}} | 2>1 grep -v "cgisock"