Originally posted by: Robor
I just checked and my laptop running Ubuntu 6.10 has a trash directory but I'm running Gnome rather than command line only. It's located in ~/.Trash I looked in there and I usually do a shift-Del so there's nothing in it. I created a file called test.txt and removed it with a 'rm test.txt' command. The file went away but not into the trash. I created another file called test.txt while in Nautilus and deleted it (not shift-Del) and it did go into the ~/.Trash directory.
I just removed a directory with "rm -rdf /the/path" and it's the wrong directory! Can I get it back?
I may look into aliasing the rm command to mv in the future.
Originally posted by: OSX
pwned
Originally posted by: Brazen
I need help. This is a basic command line only install of Ubuntu Server. I just removed a directory with "rm -rdf /the/path" and it's the wrong directory! Can I get it back?
Is there anyway to recover the deleted directory?
The file system is XFS, by the way.
Originally posted by: OSX
pwned
Originally posted by: Dravic
Originally posted by: Brazen
I need help. This is a basic command line only install of Ubuntu Server. I just removed a directory with "rm -rdf /the/path" and it's the wrong directory! Can I get it back?
Is there anyway to recover the deleted directory?
The file system is XFS, by the way.
if you are using the -f switch the systems is assuming you are sure you want to delete it. You are specifically telling the OS NOT to prompt me for verification. Unitl you have backups its probably best to not use the -f option and 'y' your way through the prompts.
rm -rf is a lesson every good admin learns first hand.
here is a free one from a long time unix admin, always use absolute paths when using rm -rf. never ever ever ever use rm -rf * , the one time you dont check your pwd, you will be in a whole world of hurt..
but then again, i'm an production operations kinda guy and dont take needless chances.
Thanks for making it worse troll.Originally posted by: Markbnj
Ah, I see the Linux Community End-user Support Team just got back from lunch.Originally posted by: OSX
pwned
Not that I'd argue with the advice (and I'm sure Brazen knows that he should have been more careful 😛), but I don't see the -f option really mattering one way or the other. If your files are all writable then you won't get any prompts anyway and if just some of them aren't you have a good chance of having deleted other stuff before you get to those files. If you have a habit of making important files unwritable for this purpose then it's another story. Maybe using the -i flag is safer (but certainly tedious for anything recursive) 🙂Originally posted by: Dravic
if you are using the -f switch the systems is assuming you are sure you want to delete it. You are specifically telling the OS NOT to prompt me for verification. Unitl you have backups its probably best to not use the -f option and 'y' your way through the prompts.
Originally posted by: kamper
Thanks for making it worse troll.Originally posted by: Markbnj
Ah, I see the Linux Community End-user Support Team just got back from lunch.Originally posted by: OSX
pwned
Originally posted by: kamper
Thanks for making it worse troll.Originally posted by: Markbnj
Ah, I see the Linux Community End-user Support Team just got back from lunch.Originally posted by: OSX
pwned
Not that I'd argue with the advice (and I'm sure Brazen knows that he should have been more careful 😛), but I don't see the -f option really mattering one way or the other. If your files are all writable then you won't get any prompts anyway and if just some of them aren't you have a good chance of having deleted other stuff before you get to those files. If you have a habit of making important files unwritable for this purpose then it's another story. Maybe using the -i flag is safer (but certainly tedious for anything recursive) 🙂Originally posted by: Dravic
if you are using the -f switch the systems is assuming you are sure you want to delete it. You are specifically telling the OS NOT to prompt me for verification. Unitl you have backups its probably best to not use the -f option and 'y' your way through the prompts.
Originally posted by: Brazen
The thing is, it wasn't that I wasn't being careful about what I was deleting, and I was using the absolute path... I guess I should just not try to type so fast :brokenheart: This makes me think, it would be nice if using the -f switch (or always) that it would just prompt you ONCE to ask if this is really what you want to do for the whole thing.
Originally posted by: n0cmonkey
Originally posted by: Brazen
The thing is, it wasn't that I wasn't being careful about what I was deleting, and I was using the absolute path... I guess I should just not try to type so fast :brokenheart: This makes me think, it would be nice if using the -f switch (or always) that it would just prompt you ONCE to ask if this is really what you want to do for the whole thing.
No, it wouldn't be nice. '-f' means DO IT, DO IT NOW! Prompting is unreasonable in this situation.
Originally posted by: Brazen
Originally posted by: n0cmonkey
Originally posted by: Brazen
The thing is, it wasn't that I wasn't being careful about what I was deleting, and I was using the absolute path... I guess I should just not try to type so fast :brokenheart: This makes me think, it would be nice if using the -f switch (or always) that it would just prompt you ONCE to ask if this is really what you want to do for the whole thing.
No, it wouldn't be nice. '-f' means DO IT, DO IT NOW! Prompting is unreasonable in this situation.
fine then. They need a "prompt me once for the whole thing" switch then. It seems reasonable, for something so destructive.
Originally posted by: n0cmonkey
It's open source, so submit a patch! 🙂
Originally posted by: Brazen
Originally posted by: n0cmonkey
It's open source, so submit a patch! 🙂
Touche! Just as soon as I learn to program...
fine then. They need a "prompt me once for the whole thing" switch then. It seems reasonable, for something so destructive.