From: Gustavo Guillermo Perez <gustavo@compunauta.com>
To: "Mário Gamito" <gamito@netual.pt>, linux-admin@vger.kernel.org
Subject: Re: Deleting many files from a directory
Date: Sat, 25 Dec 2004 18:08:33 +0600 [thread overview]
Message-ID: <200412251808.33457.gustavo@compunauta.com> (raw)
In-Reply-To: <41CA927C.2000508@netual.pt>
El Jueves 23 Diciembre 2004 15:40, Mário Gamito escribió:
> Hi,
>
> When we have too many files in a directory, let's say thousands, we
> cannot rm -f * on them. The system says there are too many files.
> So, one must go through a tedious process of deleting by parts.
>
> Is there a way to wipe them all at onde ?
>
> Thank you.
>
> Warm Regards.
if is Just a directory, call rm with the name of the directory
like that
rm -rf /dirname
where the r is for recursive, sometimes find hangs with more than 65535 files
in a single directory in some older versions (I still using some ones).
If you have a lot of folders with a lot of files, then:
find -type d | while read dir; do rm -rf "$dir" ; done
"" in $dir is for names with spaces.
Mery Christmas
--
-------
Gustavo Guillermo Perez
Compunauta uLinux
www.userver.tk
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2004-12-25 12:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-23 9:40 Deleting many files from a directory Mário Gamito
2004-12-23 9:59 ` Mark Nipper
2004-12-23 10:13 ` harry_b
2004-12-23 10:48 ` Mark Nipper
2004-12-30 11:25 ` Glynn Clements
2004-12-23 12:08 ` Hal Wigoda
2004-12-30 11:26 ` Glynn Clements
2004-12-25 12:08 ` Gustavo Guillermo Perez [this message]
2004-12-24 18:39 ` John Julian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200412251808.33457.gustavo@compunauta.com \
--to=gustavo@compunauta.com \
--cc=gamito@netual.pt \
--cc=linux-admin@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).