You are not logged in.
Pages: 1
Hello all,
I don't know what I wanted to do with this command but I did it ^^
-----------------------------------------------------------------------------
# rm YYYYY.data Whitecastle
rm: cannot remove `Whitecastle': No such file or directory
-----------------------------------------------------------------------------
After this clever action I can't see the YYYYY.data file in the folder, is it still on my HDD or gone forever?
Thanks in advance.
Last edited by Namik Delilovic (2009-05-12 16:07:46)
Offline
what file system are you using? there have been many problems like this already, search the forums and google "linux undelete from ext3 filesystem" assuming it's ext3
Offline
Well, you removed it so its not there anymore (not listed anyway).
Depending on your filesystem there is a chance you could undelete it.
http://bbs.archlinux.org/viewtopic.php?id=71879&p=2
http://bbs.archlinux.org/viewtopic.php?id=63091
Search the forum and use google.
Offline
ooops !
well, in linux/unix the theme is: "You asked for it, you got it!"
The windows side of the coin:
Are you sure you want to do this (y/n)? y
Are you really, really sure(y/n)? y
If you do this, the file might be lost forever - do you still want to delete it (y/n)? y
Ok, done! But in case you change your mind it can be found in your trashcan.
Now - which scenario would you prefer?
One lives and learns and I bet that in the future you may be tad more careful with the 'rm' command!
Offline
Well I am lucky it was just a movie (600mb) , but I was wondering what happened to it:)
Thanks for your reply.
Offline
"trashcans" are an implementation by desktop environment where files are sent to a temporary holding place until you explicitly remove them. for example, if you did this from a gnome GUI, it would move it to some hidden and remote location, but would let you restore it.
when you use rm from the terminal, it immediately "deletes" the file bypassing any use of a trashcan. Fortunately, most filesystems wont actually REMOVE the data, but merely mark its location on your harddrive as "usable" by other file writes. Because of this, you may still be able to recover the item.
as stated, google for file recovery and your type of file system and you may be in luck. but be more careful with rm next time....especially if you start tacking on -rf and slashes =P
Offline
"trashcans" are an implementation by desktop environment where files are sent to a temporary holding place until you explicitly remove them. for example, if you did this from a gnome GUI, it would move it to some hidden and remote location, but would let you restore it.
when you use rm from the terminal, it immediately "deletes" the file bypassing any use of a trashcan. Fortunately, most filesystems wont actually REMOVE the data, but merely mark its location on your harddrive as "usable" by other file writes. Because of this, you may still be able to recover the item.
as stated, google for file recovery and your type of file system and you may be in luck. but be more careful with rm next time....especially if you start tacking on -rf and slashes =P
"when you use rm from the terminal, it immediately "deletes" the file bypassing any use of a trashcan. Fortunately, most filesystems wont actually REMOVE the data, but merely mark its location on your harddrive as "usable" by other file writes. Because of this, you may still be able to recover the item."
Nice to know that, i never thought about it
Thanks
Offline
"when you use rm from the terminal, it immediately "deletes" the file bypassing any use of a trashcan. Fortunately, most filesystems wont actually REMOVE the data, but merely mark its location on your harddrive as "usable" by other file writes. Because of this, you may still be able to recover the item."
Nice to know that, i never thought about it
Thanks
sure thing! I believe you can modify your ~/.bashrc to change the behavior of rm to reflect a trash can...I'm not sure if this works in Arch as I havent tried it here - but it *SHOULD* of course.
make a trash directory first:
cd ~/
mkdir .Trash
~/.bashrc:
alias rm="mv ~/.Trash"
If you now rm a file or directory as the user with the new .bashrc, it should go to trash. log out and back in or reboot first though. additionally, rm now behaves like mv - keep this in mind! If for example, ~/.Trash contains a file named "foobar" and you delete "foobar" from somewhere else on your system...mv now overwrites (replaces) the foobar that was already in the trash with the foobar you just moved. obviously, the above solution isnt perfect, but its a quick and dirty way to save your butt from time to time.
If you hunt around I'm sure you could find a script to more intelligently handle deletions and put an alias in for rm to call that from /usr/bin or something.
you can also edit ~/.bashrc to contain
alias rm = 'rm -i'
which will interactively ask for confirmation...personally - this is a PITA if you ask me - but many people like it. additionally, i just got in the habit to confirm anything and then in the case that I did type the wrong thing, i confirmed it anyway. a bit of windows dialog syndrome, if you will... haha
handling your deletion all comes down to how careful you can be...hopefully one of the above suggestions helps save you further turmoil down the line
Last edited by thisperishedmin (2009-05-13 11:48:37)
Offline
Creating a trash folder in Linux is a good idea, but if I do it ill find some good scripts to handle that for me
This was my first post, and I must say the community of Arch Linux is excellent, thank you all.
Offline
Creating a trash folder in Linux is a good idea, but if I do it ill find some good scripts to handle that for me
This was my first post, and I must say the community of Arch Linux is excellent, thank you all.
I'll post back if I get the chance to look and find anything useful...
Secondly, welcome to the forums and welcome to Arch! We do what we can
Offline
There is a package called 'trash' in AUR, I believe this is exactly what you people are looking for.
http://aur.archlinux.org/packages.php?ID=9874
"Click clack, clicketyclacketyclick!"
-- IBM Model M
Offline
Pages: 1