|
How can I find and remove selected files recursively on AIX? |
|
|
|
|
Tuesday, 29 November 2005 12:21 |
This can be achieved by using a find command: Example 1: Delete all files with txt extension from a directory “/home/user1” find /home/user1 \( -name '*.txt' \) -exec \rm {} \; Example 2: Remove all files named “test.txt” OR “test.log” from a directory” “/home/user1” that have not been accessed for a 5 days and that are not mounted using NFS: find /home/user1 \( -name ‘test.txt’ -o -name 'test.log' \) -atime +5 ! -fstype nfs -exec \rm {} \;
|
|
Last Updated on Tuesday, 29 November 2005 12:23 |