Tricky Deleting
Eric Jensen
eric at emstraffic.com
Tue Mar 8 17:16:48 MST 2005
Working with a new backup scheme and trying to think of a good way to
delete all sub folders of a directory, but not any files in the root of
the directory. For example, I have a directory structure like:
/2005/03/08. Folder '03' has a folder for every single day with the
daily backups. At the end of the month I am moving the last day's
backups to the root of the month's folder (03) and then want to clear
out all the daily folders. I could just copy them to a temporary
folder, do the traditional rm -rf and move the files back. But curious
to know if there is a handier way to do this, since I'm sure it will
come up again.
Eric Jensen
More information about the PLUG
mailing list