Re: [fedora-list] What the hell are these dirs?

2009-07-26 Thread Rich Mahn
===snip

> BTW, I'm running this command, as suggested by an earlier poster:
> 
> find . -type f -exec rm -fv '{}' +

This is extremely inefficient.  It spawns a process for every file.
With as many files as you have this will take days.

This is better:

find . -type f -print0 |xargs -r -0 rm -f

It spawns a process as if fills up the maximum size command line.
Probably hundreds of times faster than the original.

or this:

find . -depth -type d -print0 |xargs -r -0 rm -Rf

Which deletes directories and is much faster than the previous.

but I expect this is best:

find . -depth -delete

or if you want to see them fly on you screen

find . -depth -print -delete

Your original find did not delete the directories, just the files in
them.  Is that what you want?  Or did you want to delete the directories
as well.  If you want to preserve the directory structure, then this is
probably what you want:

find . -depth -type f -delete
or
find . -depth -type f -print -delete
to watch them go away.

Good luck

Rich
No virus found in this outgoing message.
Checked by AVG - www.avg.com
Version: 8.5.392 / Virus Database: 270.13.30/2262 - Release Date: 07/25/09 
18:01:00
-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

Re: [fedora-list] What the hell are these dirs?

2009-07-26 Thread Tony Nelson
On 09-07-26 08:32:08, Rich Mahn wrote:
> ===snip
> 
> > BTW, I'm running this command, as suggested by an earlier poster:
> > 
> > find . -type f -exec rm -fv '{}' +
> 
> This is extremely inefficient.  It spawns a process for every file.

Not so.  Better for you to read `man find` before posting.

> With as many files as you have this will take days.
 ...

The slow part of what he did is the "v".

-- 

TonyN.:'   
  '  


-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: [fedora-list] What the hell are these dirs?

2009-07-26 Thread Kanwar Ranbir Sandhu
On Sun, 2009-07-26 at 09:30 -0400, Tony Nelson wrote:
> > With as many files as you have this will take days.
>  ...
> 
> The slow part of what he did is the "v".

Yes, very true.  I did it to make sure files were being deleted, and to
see if there was anything other than jpegs.  I should have stopped it
and removed the "v" once I was satisfied.

Anyway, it's gone now.  Unfortunately, even without out the "-v", I've
barely made a dent.  This is going to take a long, long, long time.

Regards,

Ranbir

-- 
Kanwar Ranbir Sandhu
Linux 2.6.27.25-170.2.72.fc10.x86_64 x86_64 GNU/Linux 
10:12:44 up 2 days, 1:39, 3 users, load average: 1.44, 1.71, 2.31 


-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: [fedora-list] What the hell are these dirs?

2009-07-27 Thread g
Kanwar Ranbir Sandhu wrote:

> Anyway, it's gone now.  Unfortunately, even without out the "-v", I've
> barely made a dent.  This is going to take a long, long, long time.

and you are still using 2 programs to do deletions, so it is going to
take a long time.

if you do not have them removed by now, i suggest you follow what i wrote
in other post of 'Date: Sun, 26 Jul 2009 08:15:45 +'.

you can prove this by opening a virtual terminal and run 'df' at a 1 min
intervals with your current 'find/rm'.

after about 5 displays 'df',  to end your 'find/rm', then do a drag
and drop of;

  rm -fR [0-9]*;rm -fR [a-l]*;rm -fR [m-z]*;rm -fR [A-L]*;rm -fR [M-Z]*

into a virtual terminal and run it.

from a 2nd vt, run 'df' as above and you should see a greater size change.

only problem you will have, as i mentioned before, you may have to change
to span within the '[ ]'.

you can set up a 'for i' loop and pass 0-9, A-Z, a-z as $i, 'rm -fR [$i]*'.

and if you like, you can add 'df /dev/sdx', 'x' being drive/partition that
files are on and see that you are deleting.

one note of reasoning, if there are several hundred/thousand of files that
start with '$i' you may need a double loop '[$i$j]' to get files with out
have 'too many files' error.

-- 

peace out.

tc,hago.

g
.


in a free world without fences, who needs gates.
**
help microsoft stamp out piracy - give linux to a friend today.
**
to mess up a linux box, you need to work at it.
to mess up an ms windows box, you just need to *look* at it.
**
learn linux:
'Rute User's Tutorial and Exposition' http://rute.2038bug.com/index.html
'The Linux Documentation Project' http://www.tldp.org/
'LDP HOWTO-index' http://www.tldp.org/HOWTO/HOWTO-INDEX/index.html
'HowtoForge' http://howtoforge.com/




signature.asc
Description: OpenPGP digital signature
-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines