I want to compress all the files in a given directory. My problem is that there is a file linked to another file in this directory. When I run the command
compress dir/*
I get an error because of the link
How do I compress all files except the ones that are linked??
-rw-r----- 1 t588331 devel 155 Nov 08 10:28 grp_billing.200111
-rw-r--r-- 2 t588331 devel 29 Nov 08 10:27 frank
-rw-r--r-- 2 t588331 devel 29 Nov 08 10:27 todd
$ find /home/t588331/unixtest -type f -exec compress {} \;
/home/t588331/unixtest/todd: This file already has 1 links. It is not changed.
/home/t588331/unixtest/frank: This file already has 1 links. It is not changed.
"compress" wants to change name to frank.Z and todd.Z and it's not possible, because "compress" doesn't know in which directory are second names located.
I'm afraid that only solution is remove the second links ...