Search Results

Search: Posts Made By: ml0fl1n
Forum: IP Networking 12-27-2005
2,901
Posted By ml0fl1n
Presupposing ksh, check whether DIRECTORY is...
Presupposing ksh, check whether DIRECTORY is valid after the read with:

[ -d $DIRECTORY ] || {
echo bad directory $DIRECTORY
exit
}

# then change to the target directory
cd...
26,005
Posted By ml0fl1n
Even if the filesystem isn't mounted your check...
Even if the filesystem isn't mounted your check of it (ls -ltr) will succeed. In other words, the mount *point* probably exists regardless of whether the filesystem is mounted or not.

If you want...
5,378
Posted By ml0fl1n
Or do it all in one go find <the path you...
Or do it all in one go

find <the path you want to check> -ctime -60 -exec rm {} \;

You would want to be very, very sure of where you run this, as most operating system files would be older...
179,919
Posted By ml0fl1n
ksh because it works on every posix compliant...
ksh because it works on every posix compliant Unix. I have run ksh scripts *without* modification on Solaris, HP-UX, AIX, Linux (many), Irix, etc.
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 11:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy