Tuesday Oct 24, 2006

How to delete a lot of files from a directory.

If you have more than can be passed directly to a command.

v4u-3500f-gmp03 135 # rm test/test_dir/\*/\*                       
/usr/bin/ksh: /usr/bin/rm: arg list too long
v4u-3500f-gmp03 136 # echo test/test_dir/\*/\* | xargs rm
v4u-3500f-gmp03 137 # 

There are lots of other ways to skin this cat.

Tags:

About

This is the old blog of Chris Gerhard. It has mostly moved to http://chrisgerhard.wordpress.com

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today