HOME SOFTWARE CONSULTANCY TRAINING REFERENCE PARTNERS SEARCH
spacer
Latest Tips
e-business
ITIL
Linux
Management
Modeling
Oracle
SQL
UNIX
Windows
z/OS
 
 
 
spacer
 

You have a sub-directory with a large number of files and you want to delete some of them. However when you try using the "rm" command you are told that the argument list is too long. You can get round this by using the -exec option of the "find" command instead.

For example, you have a directory called subdir containing huge numbers of files starting with the characters 2002. You can delete these successfully as follows:

find subdir -name 2002* -exec rm \{\} \;

Next UNIX Tip