How to remove all subdirectory/file under current directory ?

  • Follow


Hi All

Any suggestion ? Currently, I am using below shell command

cd delete_path
rm -f *      # remove current directory files
rm -f */*    # remove subdirectory files
rm -f */*/*  # repeat ...
rm -f */*/*/*
rm -f */*/*/*/*
rm -f */*/*/*/*/*
rm -f */*/*/*/*/*/*
rm -f */*/*/*/*/*/*/*
rm -f */*/*/*/*/*/*/*/*
du -k | awk '{print $2}' |sort  -r |xargs rmdir -p  # remove all
subdirectory

moonhkt
0
Reply moonhkt (146) 3/9/2010 7:06:54 AM

moonhkt wrote:
> Hi All
> 
> Any suggestion ? Currently, I am using below shell command

rm(1) has options -r/-R to remove all subdiretories/files. See man rm
for details.

Other solutions to delete specific files are find(1) with option -exec
and a remove command or find(2) with -print0 and xargs -O. See man find
for details, or browse this group's archives since this is a frequent
question.

Janis

> 
> cd delete_path
> rm -f *      # remove current directory files
> rm -f */*    # remove subdirectory files
> rm -f */*/*  # repeat ...
> rm -f */*/*/*
> rm -f */*/*/*/*
> rm -f */*/*/*/*/*
> rm -f */*/*/*/*/*/*
> rm -f */*/*/*/*/*/*/*
> rm -f */*/*/*/*/*/*/*/*
> du -k | awk '{print $2}' |sort  -r |xargs rmdir -p  # remove all
> subdirectory
> 
> moonhkt
0
Reply Janis 3/9/2010 7:30:20 AM


On 09/03/2010 08:06, moonhkt wrote:
> Hi All
> 
> Any suggestion ? Currently, I am using below shell command
> 
> cd delete_path
> rm -f *      # remove current directory files
> rm -f */*    # remove subdirectory files
> rm -f */*/*  # repeat ...

What you are looking for is the both dangerous and popular drug
rm -rf *

-- 
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail? 
0
Reply Dominic 3/9/2010 7:36:33 AM

On Mon, 08 Mar 2010 23:06:54 -0800, moonhkt wrote:

> Hi All
> 
> Any suggestion ? Currently, I am using below shell command
> 
> cd delete_path
> rm -f *      # remove current directory files rm -f */*    # remove
> subdirectory files rm -f */*/*  # repeat ... rm -f */*/*/*
> rm -f */*/*/*/*
> rm -f */*/*/*/*/*
> rm -f */*/*/*/*/*/*
> rm -f */*/*/*/*/*/*/*
> rm -f */*/*/*/*/*/*/*/*
> du -k | awk '{print $2}' |sort  -r |xargs rmdir -p  # remove all
> subdirectory
> 
> moonhkt

Wow, that was a lot of work to replace 'rm -rf'

0
Reply jellybean 3/9/2010 9:10:10 AM

Dominic Fandrey wrote:
> What you are looking for is the both dangerous and popular drug
> rm -rf *

On a sidenote, what I have forced myself to learn is using `rm * -rf` It
somehow gives me just that fraction of a second to realize what I want
to delete before  press ENTER.

It might not work everywhere, nut it des on (my) linux and especially
when using [TAB] for completion has saved me in the past. e.g. if I want
to delete a directory ~/none, use tab for completion and mistye the n
for a b:
rm -rf ~/b[tab][enter]
The ENTER is almost imidiatly after the tab and I have deleted bin and
not none.

Now if I would do `rm ~/b[tab] -rf` I would have the time of typing 
" -rf" before I hit enter and see that it says ~/bin and not ~/none.

houghi
-- 
________________________  	Open your eyes, open your mind
			| 	proud like a god don't pretend to be blind
			|	trapped in yourself, break out instead
http://openSUSE.org	|	beat the machine that works in your head
0
Reply houghi 3/9/2010 12:22:40 PM

On 3/9/2010 1:06 AM, moonhkt wrote:
> Hi All
>
> Any suggestion ? Currently, I am using below shell command
>
> cd delete_path
> rm -f *      # remove current directory files
> rm -f */*    # remove subdirectory files
> rm -f */*/*  # repeat ...
> rm -f */*/*/*
> rm -f */*/*/*/*
> rm -f */*/*/*/*/*
> rm -f */*/*/*/*/*/*
> rm -f */*/*/*/*/*/*/*
> rm -f */*/*/*/*/*/*/*/*
> du -k | awk '{print $2}' |sort  -r |xargs rmdir -p  # remove all
> subdirectory
>
> moonhkt

Genuinely curious - "rm" only has about 5 or 6 options so when you looked up the 
man page did you not understand what "recursively" meant or not notice it or was 
it something else?

	Ed.
0
Reply Ed 3/9/2010 12:35:29 PM

>>>>> houghi  <houghi@houghi.org.invalid> writes:
>>>>> Dominic Fandrey wrote:

 >> What you are looking for is the both dangerous and popular drug
 >> rm -rf *

 > On a sidenote, what I have forced myself to learn is using `rm *
 > -rf` It somehow gives me just that fraction of a second to realize
 > what I want to delete before press ENTER.

	A good habit, indeed.

 > It might not work everywhere, nut it des on (my) linux and
 > especially when using [TAB] for completion has saved me in the
 > past. e.g. if I want to delete a directory ~/none, use tab for
 > completion and mistye the n for a b: rm -rf ~/b[tab][enter] The
 > ENTER is almost imidiatly after the tab and I have deleted bin and
 > not none.

	When it comes to me, I occasionally mistype nothing for a
	letter.  So, it'd easily become $ rm -rf ~/ RET, if not such a
	habit.

 > Now if I would do `rm ~/b[tab] -rf` I would have the time of typing
 > " -rf" before I hit enter and see that it says ~/bin and not ~/none.

-- 
FSF associate member #7257
0
Reply Ivan 3/9/2010 1:53:24 PM

On Tue, 09 Mar 2010 06:35:29 -0600, Ed Morton wrote:

> On 3/9/2010 1:06 AM, moonhkt wrote:
>> Hi All
>>
>> Any suggestion ? Currently, I am using below shell command
>>
>> cd delete_path
>> rm -f *      # remove current directory files rm -f */*    # remove
>> subdirectory files rm -f */*/*  # repeat ...
>> rm -f */*/*/*
>> rm -f */*/*/*/*
>> rm -f */*/*/*/*/*
>> rm -f */*/*/*/*/*/*
>> rm -f */*/*/*/*/*/*/*
>> rm -f */*/*/*/*/*/*/*/*
>> du -k | awk '{print $2}' |sort  -r |xargs rmdir -p  # remove all
>> subdirectory
>>
>> moonhkt
> 
> Genuinely curious - "rm" only has about 5 or 6 options so when you
> looked up the man page did you not understand what "recursively" meant
> or not notice it or was it something else?
> 
> 	Ed.

The man pages may not be available in moonhkt's native language?
0
Reply jellybean 3/9/2010 2:35:44 PM

houghi wrote:

> what I have forced myself to learn is using `rm * -rf` It somehow
> gives me just that fraction of a second to realize what I want to
> delete before press ENTER.

Options after arguments is not portable [1],
(and btw: incompatible with a terminating "--").

And a few times, when I noticed that it's possible at all, e.g. in GNU,
I (personally) even found that rather annoying - but obviously an "ymmv".

[1] not to confuse with find, which additionally knows "expressions".
0
Reply Sven 3/9/2010 2:44:43 PM

On 3/9/2010 8:35 AM, jellybean stonerfish wrote:
> On Tue, 09 Mar 2010 06:35:29 -0600, Ed Morton wrote:
>
>> On 3/9/2010 1:06 AM, moonhkt wrote:
>>> Hi All
>>>
>>> Any suggestion ? Currently, I am using below shell command
>>>
>>> cd delete_path
>>> rm -f *      # remove current directory files rm -f */*    # remove
>>> subdirectory files rm -f */*/*  # repeat ...
>>> rm -f */*/*/*
>>> rm -f */*/*/*/*
>>> rm -f */*/*/*/*/*
>>> rm -f */*/*/*/*/*/*
>>> rm -f */*/*/*/*/*/*/*
>>> rm -f */*/*/*/*/*/*/*/*
>>> du -k | awk '{print $2}' |sort  -r |xargs rmdir -p  # remove all
>>> subdirectory
>>>
>>> moonhkt
>>
>> Genuinely curious - "rm" only has about 5 or 6 options so when you
>> looked up the man page did you not understand what "recursively" meant
>> or not notice it or was it something else?
>>
>> 	Ed.
>
> The man pages may not be available in moonhkt's native language?

Yes, but if so then neither is this NG and I'd think this from the rm man page:

      -r, -R, --recursive   remove directories and their contents recursively

would be at least as easy to understand as the comments the OP wrote in his script:

	rm -f *      # remove current directory files
	rm -f */*    # remove subdirectory files
	rm -f */*/*  # repeat ...

and the responses posted here. Like I said, I'm just curious about how a 
question like this gets posted....

     Ed.
0
Reply Ed 3/9/2010 3:12:56 PM

Sven Mascheck wrote:
> houghi wrote:
>
>> what I have forced myself to learn is using `rm * -rf` It somehow
>> gives me just that fraction of a second to realize what I want to
>> delete before press ENTER.
>
> Options after arguments is not portable [1],

That is what I thought and therfore wrote that it might not work
everywhere.

houghi
-- 
________________________  	Open your eyes, open your mind
			| 	proud like a god don't pretend to be blind
			|	trapped in yourself, break out instead
http://openSUSE.org	|	beat the machine that works in your head
0
Reply houghi 3/9/2010 3:21:08 PM

2010-03-9, 16:21(+01), houghi:
> Sven Mascheck wrote:
>> houghi wrote:
>>
>>> what I have forced myself to learn is using `rm * -rf` It somehow
>>> gives me just that fraction of a second to realize what I want to
>>> delete before press ENTER.
>>
>> Options after arguments is not portable [1],
>
> That is what I thought and therfore wrote that it might not work
> everywhere.
[...]

Actually, it doesn't work on Unix systems. It only works on GNU
systems if there's no POSIXLY_CORRECT variable in the
environment.

Also, 

rm -rf ./*
or
rm -rf -- *

are better in case some filenames start with "-"

It should also be noted that it will not remove dot files.

zsh issues a  "zsh: sure you want to delete all the files"
prompt in that very case (which you can disable), that is when
calling a "rm" command with an argument that is "*" or
"whatever/*"

In zsh, to remove every file:

rm  -rf ./*(D)

(The (D) is to include the dot files except "." and "..").



-- 
Stéphane
0
Reply Stephane 3/9/2010 5:28:29 PM

On Tue, 09 Mar 2010 09:12:56 -0600, Ed Morton wrote:

>>> Genuinely curious - "rm" only has about 5 or 6 options so when you
>>> looked up the man page did you not understand what "recursively" meant
>>> or not notice it or was it something else?
>>>
>>> 	Ed.
>>
>> The man pages may not be available in moonhkt's native language?
> 
> Yes, but if so then neither is this NG and I'd think this from the rm
> man page:
> 
>       -r, -R, --recursive   remove directories and their contents
>       recursively

Maybe the word 'recursively' came out of babelfish as something different.

> 
> would be at least as easy to understand as the comments the OP wrote in
> his script:
> 
> 	rm -f *      # remove current directory files rm -f */*    # 
remove
> 	subdirectory files rm -f */*/*  # repeat ...
> 
> and the responses posted here. Like I said, I'm just curious about how a
> question like this gets posted....
> 
>      Ed.

I wondered too.  I looked over moonhkt's post for the last few months 
(those still on my server).  Some of them look like they may have been 
piped through babelfish.  The phrase "and their contents recursively" may 
not have translated into his native tongue properly.   
0
Reply jellybean 3/10/2010 5:57:45 AM

On 3=E6=9C=8810=E6=97=A5, =E4=B8=8B=E5=8D=881=E6=99=8257=E5=88=86, jellybea=
n stonerfish <stonerf...@geocities.com>
wrote:
> On Tue, 09 Mar 2010 09:12:56 -0600, Ed Morton wrote:
> >>> Genuinely curious - "rm" only has about 5 or 6 options so when you
> >>> looked up the man page did you not understand what "recursively" mean=
t
> >>> or not notice it or was it something else?
>
> >>> =C2=A0 =C2=A0Ed.
>
> >> The man pages may not be available in moonhkt's native language?
>
> > Yes, but if so then neither is this NG and I'd think this from the rm
> > man page:
>
> > =C2=A0 =C2=A0 =C2=A0 -r, -R, --recursive =C2=A0 remove directories and =
their contents
> > =C2=A0 =C2=A0 =C2=A0 recursively
>
> Maybe the word 'recursively' came out of babelfish as something different=
..
>
>
>
>
>
> > would be at least as easy to understand as the comments the OP wrote in
> > his script:
>
> > =C2=A0 =C2=A0rm -f * =C2=A0 =C2=A0 =C2=A0# remove current directory fil=
es rm -f */* =C2=A0 =C2=A0#
> remove
> > =C2=A0 =C2=A0subdirectory files rm -f */*/* =C2=A0# repeat ...
>
> > and the responses posted here. Like I said, I'm just curious about how =
a
> > question like this gets posted....
>
> > =C2=A0 =C2=A0 =C2=A0Ed.
>
> I wondered too. =C2=A0I looked over moonhkt's post for the last few month=
s
> (those still on my server). =C2=A0Some of them look like they may have be=
en
> piped through babelfish. =C2=A0The phrase "and their contents recursively=
" may
> not have translated into his native tongue properly. =C2=A0

Before post,I asked our UNIX Admin, how to remove files under
subdirctory, he provide rm -f to me then remove remain subdirectory by
rmdir ...
In case of too many subdirectory, Usually, Ask Admin delete for me.
In my profile, I have alias for  rm=3D'rm -ie'. Each time,I just remove
one file one by one.

0
Reply moonhkt 3/10/2010 2:53:25 PM

On Mar 10, 8:53=C2=A0am, moonhkt <moon...@gmail.com> wrote:
> On 3=E6=9C=8810=E6=97=A5, =E4=B8=8B=E5=8D=881=E6=99=8257=E5=88=86, jellyb=
ean stonerfish <stonerf...@geocities.com>
> wrote:
>
>
>
>
>
> > On Tue, 09 Mar 2010 09:12:56 -0600, Ed Morton wrote:
> > >>> Genuinely curious - "rm" only has about 5 or 6 options so when you
> > >>> looked up the man page did you not understand what "recursively" me=
ant
> > >>> or not notice it or was it something else?
>
> > >>> =C2=A0 =C2=A0Ed.
>
> > >> The man pages may not be available in moonhkt's native language?
>
> > > Yes, but if so then neither is this NG and I'd think this from the rm
> > > man page:
>
> > > =C2=A0 =C2=A0 =C2=A0 -r, -R, --recursive =C2=A0 remove directories an=
d their contents
> > > =C2=A0 =C2=A0 =C2=A0 recursively
>
> > Maybe the word 'recursively' came out of babelfish as something differe=
nt.
>
> > > would be at least as easy to understand as the comments the OP wrote =
in
> > > his script:
>
> > > =C2=A0 =C2=A0rm -f * =C2=A0 =C2=A0 =C2=A0# remove current directory f=
iles rm -f */* =C2=A0 =C2=A0#
> > remove
> > > =C2=A0 =C2=A0subdirectory files rm -f */*/* =C2=A0# repeat ...
>
> > > and the responses posted here. Like I said, I'm just curious about ho=
w a
> > > question like this gets posted....
>
> > > =C2=A0 =C2=A0 =C2=A0Ed.
>
> > I wondered too. =C2=A0I looked over moonhkt's post for the last few mon=
ths
> > (those still on my server). =C2=A0Some of them look like they may have =
been
> > piped through babelfish. =C2=A0The phrase "and their contents recursive=
ly" may
> > not have translated into his native tongue properly. =C2=A0
>
> Before post,I asked our UNIX Admin, how to remove files under
> subdirctory, he provide rm -f to me then remove remain subdirectory by
> rmdir ...
> In case of too many subdirectory, Usually, Ask Admin delete for me.
> In my profile, I have alias for =C2=A0rm=3D'rm -ie'. Each time,I just rem=
ove
> one file one by one.- Hide quoted text -
>
> - Show quoted text -

Ah, so you didn't look at the man page. Now I understand.

Thanks,

     Ed.
0
Reply Ed 3/10/2010 4:36:31 PM

moonhkt wrote:
>> [...]
> 
> Before post,I asked our UNIX Admin, how to remove files under
> subdirctory, he provide rm -f to me then remove remain subdirectory by
> rmdir ...

(Ask your company to hire a second admin for the, umm, more difficult
questions.)

> In case of too many subdirectory, Usually, Ask Admin delete for me.
> In my profile, I have alias for  rm='rm -ie'. Each time,I just remove
> one file one by one.

You really shouldn't have such an alias defined in the first place. But
if you want the original rm behaviour back (i.e. to ignore the alias and
option -i) prepend a \ (a backslash) to the call, as (for example) in

   \rm *


Janis
0
Reply Janis 3/10/2010 4:45:36 PM

On Wed, 10 Mar 2010 06:53:25 -0800, moonhkt wrote:

>> I wondered too.  I looked over moonhkt's post for the last few months
>> (those still on my server).  Some of them look like they may have been
>> piped through babelfish.  The phrase "and their contents recursively"
>> may not have translated into his native tongue properly.
> 
> Before post,I asked our UNIX Admin, how to remove files under
> subdirctory, he provide rm -f to me then remove remain subdirectory by
> rmdir ... In case of too many subdirectory, Usually, Ask Admin delete
> for me. In my profile, I have alias for  rm='rm -ie'. Each time,I just
> remove one file one by one.

Oh, I see, you didn't read the manual page.  If your system has manpages, 
you may be able to look this stuff up yourself, instead of asking the 
UNIX admin.  Try "man ls" and see if you get the manpage for "ls"
If you don't have the "man" program on your system, you can look up the 
UNIX manpage for a command on the web.

 http://www.mcsr.olemiss.edu/unixhelp/alphabetical/index.html

Also some commands have built in usage information.  This can usually be 
accessed with a '-h' or '--help' option.  Try  "ls --help" and see what 
it tells you. 

0
Reply jellybean 3/11/2010 12:36:45 AM

On 3=E6=9C=8811=E6=97=A5, =E4=B8=8A=E5=8D=8812=E6=99=8245=E5=88=86, Janis P=
apanagnou <janis_papanag...@hotmail.com>
wrote:
> moonhkt wrote:
> >> [...]
>
> > Before post,I asked our UNIX Admin, how to remove files under
> > subdirctory, he provide rm -f to me then remove remain subdirectory by
> > rmdir ...
>
> (Ask your company to hire a second admin for the, umm, more difficult
> questions.)
>
> > In case of too many subdirectory, Usually, Ask Admin delete for me.
> > In my profile, I have alias for =C2=A0rm=3D'rm -ie'. Each time,I just r=
emove
> > one file one by one.
>
> You really shouldn't have such an alias defined in the first place. But
> if you want the original rm behaviour back (i.e. to ignore the alias and
> option -i) prepend a \ (a backslash) to the call, as (for example) in
>
> =C2=A0 =C2=A0\rm *
>
> Janis

Thank for your suggestion. Your suggestion already recorded on my
Notes Database.
Why not read man page,  Somthing command, like rm, will be omit.
0
Reply moonhkt 3/11/2010 12:49:14 AM

On 3=E6=9C=8811=E6=97=A5, =E4=B8=8A=E5=8D=888=E6=99=8249=E5=88=86, moonhkt =
<moon...@gmail.com> wrote:
> On 3=E6=9C=8811=E6=97=A5, =E4=B8=8A=E5=8D=8812=E6=99=8245=E5=88=86, Janis=
 Papanagnou <janis_papanag...@hotmail.com>
> wrote:
>
>
>
>
>
> > moonhkt wrote:
> > >> [...]
>
> > > Before post,I asked our UNIX Admin, how to remove files under
> > > subdirctory, he provide rm -f to me then remove remain subdirectory b=
y
> > > rmdir ...
>
> > (Ask your company to hire a second admin for the, umm, more difficult
> > questions.)
>
> > > In case of too many subdirectory, Usually, Ask Admin delete for me.
> > > In my profile, I have alias for =C2=A0rm=3D'rm -ie'. Each time,I just=
 remove
> > > one file one by one.
>
> > You really shouldn't have such an alias defined in the first place. But
> > if you want the original rm behaviour back (i.e. to ignore the alias an=
d
> > option -i) prepend a \ (a backslash) to the call, as (for example) in
>
> > =C2=A0 =C2=A0\rm *
>
> > Janis
>
> Thank for your suggestion. Your suggestion already recorded on my
> Notes Database.
> Why not read man page, =C2=A0Somthing command, like rm, will be omit.- =
=E9=9A=B1=E8=97=8F=E8=A2=AB=E5=BC=95=E7=94=A8=E6=96=87=E5=AD=97 -
>
> - =E9=A1=AF=E7=A4=BA=E8=A2=AB=E5=BC=95=E7=94=A8=E6=96=87=E5=AD=97 -

Some man page description may not apply.

Usage: tar -{c|r|t|u|x} [ -BdDEFhilmopRUsvw ] [ -Number ] [ -f
TarFile ]
           [ -b Blocks ] [ -S [ Feet ] | [ Feet@Density ] |
[ Blocksb ] ]
           [ -L InputList ] [-X ExcludeFile] [ -N Blocks ] [ -C
Directory ] File ...
Usage: tar {c|r|t|u|x} [ bBdDEfFhilLXmNopRsSUvw[0-9] ] ]
           [ Blocks ] [ TarFile ] [ InputList ] [ ExcludeFile ]
           [ [ Feet ] | [ Feet@Density ] | [ Blocksb ] ] [-C
Directory ] File ...


e.g. tar some directory , I just want tar my home directory and shell
subdirectory.Due to our testing Machine without backup to tape.

Our Admin suggest to using -L InputList.

tar -cvf abc.tar  *  -C   /home/moonhkt/db

in AIX 5.3 , All directory under my home directory in the tar file
drwxr-xr-x    3 moonhkt   adg             256 Sep 21 10:09 DLC
drwxrw----    2 moonhkt   adg            4096 Nov 02 14:24 db
drwxrw----    2 moonhkt   adg            4096 Nov 02 14:24 db9
drwxrw----    2 moonhkt   adg            4096 Mar 10 16:22 log
drwxrw----    2 moonhkt   adg            4096 Mar 11 10:14 shell
drwxrw----    2 moonhkt   adg             256 Mar 11 08:37 temp





0
Reply moonhkt 3/11/2010 4:38:02 AM

In article <xWWln.124082$h21.48563@newsfe07.ams2>,
jellybean stonerfish  <stonerfish@geocities.com> wrote:
....
>Also some commands have built in usage information.  This can usually be 
>accessed with a '-h' or '--help' option.  Try  "ls --help" and see what 
>it tells you. 

Translation: It wouldn't be Unix if it weren't hard to figure out.

It was hard for us (and believe me, I know of what I speak); it should
be hard for you.  You'll be a better person for it.

0
Reply gazelle 3/11/2010 2:32:47 PM

In article <445ecfce-91b0-4bf7-9d51-6b8bac8a0a66@w9g2000prb.googlegroups.com>,
moonhkt  <moonhkt@gmail.com> wrote:
....
>Some man page description are gibberish...:
>
>Usage: tar -{c|r|t|u|x} [ -BdDEFhilmopRUsvw ] [ -Number ] [ -f
>TarFile ]
>           [ -b Blocks ] [ -S [ Feet ] | [ Feet@Density ] |
>[ Blocksb ] ]
>           [ -L InputList ] [-X ExcludeFile] [ -N Blocks ] [ -C
>Directory ] File ...
>Usage: tar {c|r|t|u|x} [ bBdDEfFhilLXmNopRsSUvw[0-9] ] ]
>           [ Blocks ] [ TarFile ] [ InputList ] [ ExcludeFile ]
>           [ [ Feet ] | [ Feet@Density ] | [ Blocksb ] ] [-C
>Directory ] File ...
>
>
>e.g. tar some directory , I just want tar my home directory and shell
>subdirectory.Due to our testing Machine without backup to tape.

Yes.  The man pages for some commands, like 'tar' and 'cpio', *are*
gibberish.  As a long time Unix user, who uses both of these commands on
a daily basis, I find the man pages absurd.  The point is, there's only
a few things you need to know about either command; i.e., there's only a
few command variations that you'll ever use.  You have to learn how to
scan the man pages, ignoring the fluff, and pick out the pieces that
matter.  This is particularly so with the 'cpio' man page.

0
Reply gazelle 3/11/2010 2:40:06 PM

On Mar 10, 10:38=C2=A0pm, moonhkt <moon...@gmail.com> wrote:
> On 3=E6=9C=8811=E6=97=A5, =E4=B8=8A=E5=8D=888=E6=99=8249=E5=88=86, moonhk=
t <moon...@gmail.com> wrote:
>
>
>
>
>
> > On 3=E6=9C=8811=E6=97=A5, =E4=B8=8A=E5=8D=8812=E6=99=8245=E5=88=86, Jan=
is Papanagnou <janis_papanag...@hotmail.com>
> > wrote:
>
> > > moonhkt wrote:
> > > >> [...]
>
> > > > Before post,I asked our UNIX Admin, how to remove files under
> > > > subdirctory, he provide rm -f to me then remove remain subdirectory=
 by
> > > > rmdir ...
>
> > > (Ask your company to hire a second admin for the, umm, more difficult
> > > questions.)
>
> > > > In case of too many subdirectory, Usually, Ask Admin delete for me.
> > > > In my profile, I have alias for =C2=A0rm=3D'rm -ie'. Each time,I ju=
st remove
> > > > one file one by one.
>
> > > You really shouldn't have such an alias defined in the first place. B=
ut
> > > if you want the original rm behaviour back (i.e. to ignore the alias =
and
> > > option -i) prepend a \ (a backslash) to the call, as (for example) in
>
> > > =C2=A0 =C2=A0\rm *
>
> > > Janis
>
> > Thank for your suggestion. Your suggestion already recorded on my
> > Notes Database.
> > Why not read man page, =C2=A0Somthing command, like rm, will be omit.- =
=E9=9A=B1=E8=97=8F=E8=A2=AB=E5=BC=95=E7=94=A8=E6=96=87=E5=AD=97 -
>
> > - =E9=A1=AF=E7=A4=BA=E8=A2=AB=E5=BC=95=E7=94=A8=E6=96=87=E5=AD=97 -
>
> Some man page description may not apply.
>
> Usage: tar -{c|r|t|u|x} [ -BdDEFhilmopRUsvw ] [ -Number ] [ -f
> TarFile ]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[ -b Blocks ] [ -S [ Feet ] | [ =
Feet@Density ] |
> [ Blocksb ] ]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[ -L InputList ] [-X ExcludeFile=
] [ -N Blocks ] [ -C
> Directory ] File ...
> Usage: tar {c|r|t|u|x} [ bBdDEfFhilLXmNopRsSUvw[0-9] ] ]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[ Blocks ] [ TarFile ] [ InputLi=
st ] [ ExcludeFile ]
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[ [ Feet ] | [ Feet@Density ] | =
[ Blocksb ] ] [-C
> Directory ] File ...
>
> e.g. tar some directory , I just want tar my home directory and shell
> subdirectory.Due to our testing Machine without backup to tape.
>
> Our Admin suggest to using -L InputList.
>
> tar -cvf abc.tar =C2=A0* =C2=A0-C =C2=A0 /home/moonhkt/db
>
> in AIX 5.3 , All directory under my home directory in the tar file
> drwxr-xr-x =C2=A0 =C2=A03 moonhkt =C2=A0 adg =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 256 Sep 21 10:09 DLC
> drwxrw---- =C2=A0 =C2=A02 moonhkt =C2=A0 adg =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A04096 Nov 02 14:24 db
> drwxrw---- =C2=A0 =C2=A02 moonhkt =C2=A0 adg =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A04096 Nov 02 14:24 db9
> drwxrw---- =C2=A0 =C2=A02 moonhkt =C2=A0 adg =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A04096 Mar 10 16:22 log
> drwxrw---- =C2=A0 =C2=A02 moonhkt =C2=A0 adg =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A04096 Mar 11 10:14 shell
> drwxrw---- =C2=A0 =C2=A02 moonhkt =C2=A0 adg =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 256 Mar 11 08:37 temp- Hide quoted text -
>
> - Show quoted text -

Some man pages may be missing and some man pages may contain missing
information and some man pages may be hard to read. Whatever - you
should check the man pages first because if the answer is there then
that approach is usually quicker and easier for you than typing up a
question to post here, and it's always quicker and easier for us :-).

     Ed.
1
Reply Ed 3/11/2010 5:25:39 PM

$ (cd directory_to_be_emptied && rm -rf * .[!.]* ..?*)
Or if one's quite sure one's already in the desired directory:
$ m -rf * .[!.]* ..?*

On Mar 9, 12:06=A0am, moonhkt <moonhkt@gmail.com> wrote:
> Any suggestion ? Currently, I am using below shell command
> cd delete_path
> rm -f * =A0 =A0 =A0# remove current directory files
> rm -f */* =A0 =A0# remove subdirectory files
> rm -f */*/* =A0# repeat ...
> rm -f */*/*/*
> rm -f */*/*/*/*
> rm -f */*/*/*/*/*
> rm -f */*/*/*/*/*/*
> rm -f */*/*/*/*/*/*/*
> rm -f */*/*/*/*/*/*/*/*
> du -k | awk '{print $2}' |sort =A0-r |xargs rmdir -p =A0# remove all
> subdirectory
0
Reply Michael 3/25/2010 10:39:43 AM

2010-03-25, 03:39(-07), Michael Paoli:
> $ (cd directory_to_be_emptied && rm -rf * .[!.]* ..?*)
> Or if one's quite sure one's already in the desired directory:
> $ m -rf * .[!.]* ..?*
[...]

$ rm -rf -- * .[!.]* ..?*

Or:

$ rm -rf ./* .[!.]* ..?*

Or on non-GNU systems:

$ rm -rf .[!.]* ..?* *

-- 
Stéphane
0
Reply Stephane 3/26/2010 7:16:21 AM

Sven Mascheck <masch...@email.invalid> wrote:
> Houghi wrote:
> > what I have forced myself to learn is using `rm * -rf` It somehow
> > gives me just that fraction of a second to realize what I want to
> > delete before press ENTER.
> Options after arguments is not portable [1],
> (and btw: incompatible with a terminating "--").

A simple, portable technique that has saved my butt (and my data)
more than once, is to create file "-i" in the CWD(s). Specifying
command-
line option "*" without an explicit "--" options delimiter, will, with
empty file "-i", allow one a second chance to think better of doing
so.

If not already discussed, one should also get into the habit of test-
running such inexorable commands, with an prepended "echo" command,
to obviate unforeseen consequences.

echo rm -rf * # ... or be sorry!

=Brian
0
Reply bsh 3/26/2010 10:09:29 PM

In article <1f71a283-a17e-470c-9704-efc40ffd54f3@a10g2000pri.googlegroups.com>,
bsh  <brian_hiles@rocketmail.com> wrote:
>Sven Mascheck <masch...@email.invalid> wrote:
>> Houghi wrote:
>> > what I have forced myself to learn is using `rm * -rf` It somehow
>> > gives me just that fraction of a second to realize what I want to
>> > delete before press ENTER.
>> Options after arguments is not portable [1],
>> (and btw: incompatible with a terminating "--").
>
>A simple, portable technique that has saved my butt (and my data)
>more than once, is to create file "-i" in the CWD(s). Specifying
>command-
>line option "*" without an explicit "--" options delimiter, will, with
>empty file "-i", allow one a second chance to think better of doing
>so.

For those of us not so up-to-speed on shell arg-processing,
could you please elaborate a bit on the above.

The NAME of the empty file IS "-i" -- starts with a minus-sign.

Does that put it at the beginning of the alpha-sorted file-names (assuming
there are no other such filenames in the dir)?

And, so what if it's empty -- how does that change anything?

There being no "-i" in that rm, but instead a -f, how is the rm
going to give you one final chance to change your mind about
actually doing it?

Thanks!

>
>If not already discussed, one should also get into the habit of test-
>running such inexorable commands, with an prepended "echo" command,
>to obviate unforeseen consequences.
>
>echo rm -rf * # ... or be sorry!
>
>=Brian


And please also say a bit more about your so-very-important (and crazy 
not to) use of echo.

What might it show you that you can't already see by looking at
the rm-cmd itself?   

What, arguments to it shown evaluated?


What disasters might you avoid via this eval?


Also, any reason to double-quote the whole rm-with-args?  Would 
echo's output be any different?


The above two techniques being found so necessary for avoiding
screwups/disasters in your work, please say some more, 
and also give more examples (where YOU've been saved),
before we too adopt your practice.

THANKS!

David






0
Reply dkcombs 4/12/2010 5:06:20 AM

On 2010-04-12, David Combs wrote:
> In article <1f71a283-a17e-470c-9704-efc40ffd54f3@a10g2000pri.googlegroups.com>,
> bsh  <brian_hiles@rocketmail.com> wrote:
>>Sven Mascheck <masch...@email.invalid> wrote:
>>> Houghi wrote:
>>> > what I have forced myself to learn is using `rm * -rf` It somehow
>>> > gives me just that fraction of a second to realize what I want to
>>> > delete before press ENTER.
>>> Options after arguments is not portable [1],
>>> (and btw: incompatible with a terminating "--").
>>
>>A simple, portable technique that has saved my butt (and my data)
>>more than once, is to create file "-i" in the CWD(s). Specifying
>>command-
>>line option "*" without an explicit "--" options delimiter, will, with
>>empty file "-i", allow one a second chance to think better of doing
>>so.
>
> For those of us not so up-to-speed on shell arg-processing,
> could you please elaborate a bit on the above.
>
> The NAME of the empty file IS "-i" -- starts with a minus-sign.
>
> Does that put it at the beginning of the alpha-sorted file-names (assuming
> there are no other such filenames in the dir)?

    The shell expands wildcards into an alphabetically sorted list.

> And, so what if it's empty -- how does that change anything?

   It doesn't.

> There being no "-i" in that rm, but instead a -f, how is the rm
> going to give you one final chance to change your mind about
> actually doing it?
>
> Thanks!
>
>>
>>If not already discussed, one should also get into the habit of test-
>>running such inexorable commands, with an prepended "echo" command,
>>to obviate unforeseen consequences.
>>
>>echo rm -rf * # ... or be sorry!
>
> And please also say a bit more about your so-very-important (and crazy 
> not to) use of echo.
>
> What might it show you that you can't already see by looking at
> the rm-cmd itself?   

    With echo, you will see the line as it would be executed -- with
    the wilcard already expanded.

> What, arguments to it shown evaluated?

    Yes. The shell expands wildcards to create a list of arguments
    that will be substituted on the command line.

> What disasters might you avoid via this eval?

    It allows you to see exactly what would be deleted without
    actually deleting anything. Once you know that the expanded list
    is correct, you can remove the echo.

> Also, any reason to double-quote the whole rm-with-args?  Would 
> echo's output be any different?

    Wildcards within quotes are not expanded.

> The above two techniques being found so necessary for avoiding
> screwups/disasters in your work, please say some more, 
> and also give more examples (where YOU've been saved),
> before we too adopt your practice.


-- 
   Chris F.A. Johnson, author           <http://shell.cfajohnson.com/>
   ===================================================================
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
   Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
   ===== My code in this post, if any, assumes the POSIX locale  =====
   ===== and is released under the GNU General Public Licence    =====
0
Reply Chris 4/12/2010 7:11:48 AM

David Combs wrote:
> And please also say a bit more about your so-very-important (and crazy 
> not to) use of echo.
>
> What might it show you that you can't already see by looking at
> the rm-cmd itself?   
>
> What, arguments to it shown evaluated?

I also use it when I write a script to be sure it would remove the exact
thing I want to be removed. e.g a stupid script:
#!/bin/bash
DIR=$1
DIR=.
echo rm -rf $DIR

The above is a very stupid example. Obviously here it is clear that I
made a mistake with the second DIR. With a much longer script it might
not be that easy that you make some mistake. So I first run it with the
echo and some different parameters, if needed, isntead of just adding
`set -x` and notice everything is gone.

I do that with any file manipulation, including writing to it.

houghi
-- 
This was written under the influence of the following:
|  Artist : 
|    Song : Georgia Tech - III-2 - String Quartet - String Quartet No. 5 in A major - Andante Cantabile (Theme and Variations), Op. 15 no. 5
|   Album : 
0
Reply houghi 4/12/2010 12:19:26 PM

dkco...@panix.com (David Combs) wrote:
> bsh  <brian_hi...@rocketmail.com> wrote:
> > Sven Mascheck <masch...@email.invalid> wrote:
> > > Houghi wrote:
> > ...
> For those of us not so up-to-speed on shell arg-processing,
> could you please elaborate a bit on the above.

Sorry for the delay in responding. I'm assuming that
Mr. Johnson's post in not comprehensive.

> The NAME of the empty file IS "-i" -- starts with a minus-sign.
> Does that put it at the beginning of the alpha-sorted file-names (assuming
> there are no other such filenames in the dir)?

Yes -- as you said, if it sorts to the beginning of
the generated filenames by expansion of the asterisk.
Is this what you mean by "no other such filenames in
the dir"? inasmuch as a file _object_ such as a symlink,
named pipe, semaphore (in some Unices), or directory
(directories _are_ special files, after all) doesn't
sort before the "-" character, or is called, say,
"-a".

My technique is simple, easy to implement, and will
_probably_ prevent a ruined day some time in the
future.

If there should be an issue with how to create a
file that starts with a dash ("-") character:

"Dealing With Files That Start With A Dash"
http://www.gentoo-wiki.info/TIP_Dealing_with_files_that_start_with_a_dash

> And, so what if it's empty -- how does that change anything?

Nope. Like I implied above, "-i" can even be a directory,
which will never be empty.

> There being no "-i" in that rm, but instead a -f, how is the rm
> going to give you one final chance to change your mind about
> actually doing it?

It won't -- but I don't know of any rm(1) on any
host that didn't have a "-i" (delete interactively)
option.

> And please also say a bit more about your so-very-
> important (and crazy not to) use of echo.

As recommended, "test driving" any command line that may have
a deleterious and inexorable effect, by prepending an echo(1)
before the command, is a habit that someday you will be glad
you developed the good habit to do. Besides the above "-i"
technique not being capable of detecting truly psychotic
cases, sometimes one should want to see just what expansions,
including both filename and variable expansions, are produced.

Have I sufficiently indicated that these are "best practises"
recommended especially for those with root priveleges? I don't
believe that these techniques are original to me, and should
indeed be common knowledge amongst system administrators.

> What might it show you that you can't already see by looking at
> the rm-cmd itself?

Theoretically, you could check every single directory
listing before running any such command, or if the
command were in a script and not interactively run at
a prompt, there would (of course!) _always_ be sufficient
sanity checks to abrogate or mitigate _every_ possible
thing that could go wrong,

But.... Do you have a VERY latest backup RIGHT NOW?

> What, arguments to it shown evaluated?

I don't understand what you mean by this.
I should mention the use of the xtrace and verbose options
of most shells: -x and -v, which further explicate
flow-of-control and filename/variable substitutions.

> What disasters might you avoid via this eval?

Using "eval" is a way to potentially create a
disaster, and is generally not any way to avoid
them!

> Also, any reason to double-quote the whole rm-with-
> args?  Would echo's output be any different?

CFAJ already answered this.

> The above two techniques being found so necessary for avoiding
> screwups/disasters in your work, please say some more,
> and also give more examples (where YOU've been saved),
> before we too adopt your practice.

Too many (or too long ago, inasmuch as I haven't been
a sysadm for a decade-and-a-half, if a self-maintained
Unix-like system doesn't count) to list, but one does
come to mind:

I had a talented and responsible programmer friend,
and did his adolescent brother a favor by lending
him my command prompt, because I thought that he
was similarly responsible. He wasn't. He typed
"rm -rf *" at my prompt (the shit-for-brains!)
and witnessing the perpetration of this atrocity,
I lunged to bat his finger off the ENTER key. I
failed, but the "-i" technique didn't. So my day
wasn't ruined, and I did not indeed need water the
very grass with all my tears all the way home that
day.

Of course, the directory was the very one full
of my programs -- un-backed-up, of course -- that
I had been working on for years. I immediately gave
my account a password, and determined never to do
anyone such a "favor" again.

The lesson to be learned is: it's the things you
_cannot_ predict, at least without the "20-20
hindsight" that makes these lapses so tormenting,
that initiate the grievious disasters that
constitute the anecdotes that sysadms seem to
always have.

> THANKS!
> David

You're welcome!

=Brian
0
Reply bsh 4/30/2010 10:26:05 PM

dkco...@panix.com (David Combs) wrote:
> bsh =A0<brian_hi...@rocketmail.com> wrote:
> > Sven Mascheck <masch...@email.invalid> wrote:
> > > Houghi wrote:
> > > ...

Amusingly, after some research completely unrelated to this
thread, I happened to come across the following trivia on
John Beck's blog, a notable Solaris networking guru. He
states on his blog at:

http://blogs.sun.com/jbeck/category/General

.... that he finagled the local POSIX dweebs to patch
rm(1) under Solaris 10 (build 36+) to disallow the
construct "-rf /".

# /bin/rm -rf /
rm of / is not allowed
#

You will probably, in context of what I have said about the
matter thus so far, be surprised that I think this "fix" quite
wrong-headed, insofar as it violates Rule 3 of my Three
Laws of Language Design -- even if what we are talking
about here is system administration Best Practises.
I have to nevertheless add that the rationale he gives
is compelling.

To wit:

(1) What _should_ work, _will_ work!
(2) Provide _functionality_, not _features_, at well-defined
levels of abstraction.
(3) In context of the above, the language writer should never,
_ever_ tell the programmer what he can or can't do.

=3DBrian
0
Reply bsh 5/5/2010 12:44:50 AM

In article <a093269f-6c6d-4cde-b5fc-c7babd742516@v29g2000prb.googlegroups.com>,
bsh  <brian_hiles@rocketmail.com> wrote:
....
>... that he finagled the local POSIX dweebs to patch
>rm(1) under Solaris 10 (build 36+) to disallow the
>construct "-rf /".
>
># /bin/rm -rf /
>rm of / is not allowed
>#

Wrong error message.  It should say: Please use mkfs instead.

Incidentally, what's really insidious about this "rm -rf /" command is
not so much that it trashes the local system (*), but that it trashes any
mounted (NFS or Samba) other systems (**).  The nice thing about the "mkfs"
alternative is that it only trashes the system disk.  And there actually
are times when reformatting the disk is desirable.

----------------------------------------------------------------------------
(*) To be fully explicit here, I should have said "the local system disk
as well as any (local) mounted disks".

(**) To be fully explicit here, I should have said "to which we have
write/delete rights".

-- 
(This discussion group is about C, ...)

Wrong.  It is only OCCASIONALLY a discussion group
about C; mostly, like most "discussion" groups, it is
off-topic Rorsharch [sic] revelations of the childhood
traumas of the participants...

1
Reply gazelle 5/5/2010 10:40:17 AM

find . -name *.java  | xargs rm -rf *.java

Thanks
Satish Dubey
1
Reply Satish186 (5) 11/19/2012 7:48:15 AM

find . -name *.java  | xargs rm -rf *.java

Thanks
Satish Dubey
1
Reply Satish186 (5) 11/19/2012 7:48:39 AM

Satish186 <satishdubey.ips@gmail.com> writes:

> find . -name *.java  | xargs rm -rf *.java

What's this?  The original question was posted over two years ago and
this is not an answer to it, so maybe you want help correcting this
command.  If so, try

  find . -name \*.java | xargs rm -rf

might be closer to what you want.

-- 
Ben.
0
Reply ben.usenet (6515) 11/19/2012 2:02:40 PM

On 19-11-2012 15:02, Ben Bacarisse wrote:
> Satish186 <satishdubey.ips@gmail.com> writes:
>
>> find . -name *.java  | xargs rm -rf *.java
>
> What's this?  The original question was posted over two years ago and
> this is not an answer to it, so maybe you want help correcting this
> command.  If so, try
>
>    find . -name \*.java | xargs rm -rf
>
> might be closer to what you want.
>

What about a simple:

      rm -rIf

You can leave out the 'I', if you're desperate..... ;)
0
Reply luuk (814) 11/19/2012 8:27:58 PM

find . -name *.*  | xargs rm -rf *.*

Thanks
Satish Dubey
0
Reply Satish186 (5) 11/19/2012 8:35:00 PM

On 2012-11-19, Ben Bacarisse wrote:
> Satish186 <satishdubey.ips@gmail.com> writes:
>
>> find . -name *.java  | xargs rm -rf *.java
>
> What's this?  The original question was posted over two years ago and
> this is not an answer to it, so maybe you want help correcting this
> command.  If so, try
>
>   find . -name \*.java | xargs rm -rf
>
> might be closer to what you want.

   But that will fail if any filenames contain whitespace. It's better
   to use the -exec operator in find:

find . -name \*.java -exec rm -rf {} +


-- 
   Chris F.A. Johnson, author           <http://shell.cfajohnson.com/>
   ===================================================================
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
   Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)

0
Reply cfajohnson (1783) 11/19/2012 8:47:09 PM

In article <44KdnemZ0NBsCjfNnZ2dnUVZ_h2dnZ2d@giganews.com>,
Satish186  <satishdubey.ips@gmail.com> wrote:
>find . -name *.*  | xargs rm -rf *.*
>
>Thanks
>Satish Dubey
>
>

I would suggest that this is not an area for every Tom, Dick, and Harry to
be airing his pet (and mostly misguided theories).

So, here are my pet theories:

1) If you want to remove all the files on a device, the easiest and best
thing to do is to reformat (e.g., 'mke2fs') the device.

2) If you want to remove all the files under a certain directory (and cannot
do it as suggested above), then do: rm -rf theDir

3) And if you want to remove all the files that match a specific filename
pattern - and this is a one-off project, then do:

find theDir -name '*.jpg' > /tmp/myfile
vi /tmp/myfile
{examine the contents - make sure it is what you want - then do:
:%s/^/rm /
:x

And, finally, when you are sure everything is as it should be, do:

source /tmp/myfile
1
-- 
People who say they'll vote for someone else because Obama couldn't solve
all of Bush's messes are like people complaining that he couldn't cure cancer,
so they'll go and vote for cancer.

0
Reply gazelle3 (1598) 11/19/2012 9:01:34 PM

In article <k8e6ne$5lp$1@news.xmission.com>,
Kenny McCormack <gazelle@shell.xmission.com> wrote:
>In article <44KdnemZ0NBsCjfNnZ2dnUVZ_h2dnZ2d@giganews.com>,
>Satish186  <satishdubey.ips@gmail.com> wrote:
>>find . -name *.*  | xargs rm -rf *.*
>>
>>Thanks
>>Satish Dubey
>>
>>
>
>I would suggest that this is not an area for every Tom, Dick, and Harry to
>be airing his pet (and mostly misguided theories).
>
>So, here are my pet theories:
>
>1) If you want to remove all the files on a device, the easiest and best
>thing to do is to reformat (e.g., 'mke2fs') the device.
>
>2) If you want to remove all the files under a certain directory (and cannot
>do it as suggested above), then do: rm -rf theDir
>
>3) And if you want to remove all the files that match a specific filename
>pattern - and this is a one-off project, then do:
>
>find theDir -name '*.jpg' > /tmp/myfile
>vi /tmp/myfile
>{examine the contents - make sure it is what you want - then do:
>:%s/^/rm /
>:x
>
>And, finally, when you are sure everything is as it should be, do:
>
>source /tmp/myfile

AGREED!  By far the safest way.

Another super-safe way is to move those files you want
to delete into a new (temporary) directory.

Maybe down two or three levels of temp directories, to protect
yourself (after cd'ing to the bottom one, where the files are),
from a bouncing "." key doing ".." and you hitting <return>
before you notice it, and wipe out stuff you wanted to KEEP.

----------

Another good way is via EMACS -- using dired:

Makes it so easy to check the size, date, look at the
contents, before actually doing it.

Especially if instead of using "d" (to mark for deleting)
you use the ordinary "m" -- allows you do do all kinds
of things with just those files as a group, BEFORE you
go "! rm *" or whatever.

David

0
Reply dkcombs (290) 12/21/2012 6:28:12 AM

38 Replies
6440 Views

(page loaded in 0.041 seconds)

Similiar Articles:


















7/19/2012 6:33:28 PM


Reply: