Important Linux tip

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,693
I did that once to find out if it really would happen. it did :)
 

xane

Fledgling Freddie
Joined
Dec 22, 2003
Messages
1,695
Older versions of UNIX had a nasty habit of creating a file called "*" (asterisk), with the inevitable result when you tried to remove it without thinking first.
 

sibanac

Fledgling Freddie
Joined
Dec 19, 2003
Messages
824
hehe we used to do a mkdir /* on test systems then see what idjut would try to remove it.

I once did the rm -rf /* myself, well havent we all.
I rescued most of the system by a quick ^c.
 

sibanac

Fledgling Freddie
Joined
Dec 19, 2003
Messages
824
Clown said:
What does this do then?
erase all mounted filesystems.


btw putting 'stty erase e' in sameone his profile is always good for 15 mins of fun
 

strangely brown

Can't get enough of FH
Joined
Dec 22, 2003
Messages
54
What I actually trying to do was to delete all temporary hidden files:-

rm -rf .*

Which bright spark put the / and the . keys next to each other (on UK keyboards at least)?

For some reason it didn't touch my /home partition so I didn't lose all my data (although I guess I deserved to)...

Spent most of yesterday and this morning re-installing...
 

xane

Fledgling Freddie
Joined
Dec 22, 2003
Messages
1,695
strangely brown said:
What I actually trying to do was to delete all temporary hidden files:-

rm -rf .*

Which bright spark put the / and the . keys next to each other (on UK keyboards at least)?
Probably the same bright spark who blindly puts the -r (recursive) flag on all his commands even when they are trying to remove files not directories.

Tsk, damn those UNIX programmers who assume people think before they act.

:)
 

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,693
alias ls rm -rf



or something ;)
 

strangely brown

Can't get enough of FH
Joined
Dec 22, 2003
Messages
54
Ok, I did mean to delete all the hidden directories as well as files - Just not the from the root...

Aliases are dangerous things - Especially when deleting. I used to have a rm -f one set up in cygwin on the 'doze partition... soon got rid of it!
 

MrBlack

Fledgling Freddie
Joined
Dec 24, 2003
Messages
148
Ah yes... always a fun one that. There's that brief moment of puzzlement when the job seems to be taking a bit too long for a simple file delete...

then the curiosity about why your HD is chuntering away ten to the dozen.

Then the grim realisation, and a furious attempt to hold ctrl and punch the C key through your desk. A lot.

Tehn you realise that it had only just managed to remove something pointless (like /lib or /etc) before you stopped it. Then you go all explodey and, oh I don't know, break your favourite coffee mug or something. :eek6:

Not that this has ever happened to me before, oh no.
 

phlash

Fledgling Freddie
Joined
Dec 24, 2003
Messages
195
strangely brown said:
What I actually trying to do was to delete all temporary hidden files:-

rm -rf .*
That'll be how I managed to hose most of a Solaris system. I was logged in as root, in the /tmp directory when I decided to tidy up, typed: rm -rf .*, which of course matches '..' - you can guess the rest :(

Why are SCSI disks so fast??!!
 

Users who are viewing this thread

Top Bottom