SUMMARY: Symlinks disappear (final)

From: ROBIN_BROWN@phl.com
Date: Wed Jul 15 1998 - 14:06:01 CDT


The following solution is working great! Symlinks have remained past the 1
week mark. Many thanks.

> find /var/adm/sa \( -name 'sar*' -o -name 'sa*' \) -mtime +7 -exec rm {}
\;

Add the '-type f' option to the find command to restrict the rm
to files only.

Viet Hoang
vhoang@lucent.com

Some other suggestions, the original post follows:

Check your crontabs. Perhaps one of them is doing some housekeeping? Work
out when it's disappearing and what was running via cron at the time, by
looking in the cron log file.

Steve
steve@peachy.com

Try changing the find command so it doesn't remove symlinks, something like

> find /var/adm/sa \( -name 'sar*' -o -name 'sa*' \) -mtime +7 ! -type l
> -exec rm {} \;
>
you may need to fiddle the logic a bit to make sure the "! -type l" is
and-ed with the rest. Alternatively you could use something like -type f
for a plain file (ie, not a directory, symlink, named pipe etc).

hope this helps,

Robert.

Original post:

Sun Managers:

Release: 5.5.1
Kernel architecture: sun4m
Application architecture: sparc
Hardware provider: Sun_Microsystems
Domain:
Kernel version: SunOS 5.5.1 Generic 103640-08 March 1997

I created a symlink for /var/adm/sa to a new disk, /disk1/var/adm/sa
in order to have sufficient disk space for sar reports. Everything works
well, however every few days the symlink in the /var/adm directory for sa
disappears.



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:43 CDT