Find the answer to your Linux question:
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 21
Originally Posted by Gnux Originally Posted by thcc2 Originally Posted by smolloy Originally Posted by thcc2 i got it already, if no trash exits, that means the file was remove ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Linux Newbie
    Join Date
    Dec 2005
    Location
    Singapore
    Posts
    234

    Quote Originally Posted by Gnux
    Quote Originally Posted by thcc2
    Quote Originally Posted by smolloy
    Quote Originally Posted by thcc2
    i got it already, if no trash exits, that means the file was remove permanently after the rm command is executed
    Yup. All gone. Forever.

    is never ask for confirmation before delete
    A good thing to do before a rm is: think, think read the man and think. Then personnally as I'm sometimes doing lot of things in the same time I just add the i option it gives:
    Code:
    # rm -i docoutils.zip 
    remove docoutils.zip?
    that is a good idea
    Proper Planing is a way of success

  2. #12
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    Linux treats you like an adult (in comparison with windows). Only execute commands if you are sure you want to, and if you are sure you understand what the command does. Always read the man page -- even if someone with lots of penguins on this site tells you to enter a command, research it first. There is no guarantee that they told you to do the right thing.

    With linux you always have to think.
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  3. #13
    Linux Newbie
    Join Date
    Dec 2005
    Location
    Singapore
    Posts
    234
    Quote Originally Posted by smolloy
    Linux treats you like an adult (in comparison with windows). .
    I agree with u
    I never experience this when i 'm using windows
    i only use the mouse as my input devices while try to do something, now i have to use keyboard most of the time.
    Proper Planing is a way of success

  4. $spacer_open
    $spacer_close
  5. #14
    Linux User
    Join Date
    Apr 2005
    Location
    Ohio
    Posts
    326
    Actually I find trash to be annoying.. I hate trash.

    In Windows I use the <shift> delete combination to delete files and bypass the trash. I don't want to delete it than have to go empth the trash.. be gone file !!

    I think Linux only uses trash when you are running from Gnome or KDE and use the filemanager to delete files. now if anyone can tell me how to disable the trash or bypass it in Linux I'd be happy. because of this I ussually delete everything from the command line.



    why is my drive full, theres not many files there.. what in the world ???
    OH theres 20 GB of stuff in the trash...... grrrr //takes out the trash//
    far...out

  6. #15
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Quote Originally Posted by thcc2
    that for you url, i try to learn it, but sometimes i don't what parameters to put in
    Okay, when you have more time, take a closer look because both websites give the command, what it does, and the available options/parameters for using it.

    Have fun!

  7. #16
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,235
    You can avoid this sort of disaster permanently by setting an alias in your .bashrc file:

    alias rm rm -i

    Then, every time you open bash (e.g. by logging in), "rm" will be redefined to mean "rm -i" and rm will always prompt you before deleting just like the DOS del command does. I have this set up myself because I don't always trust myself not to delete something by accident.
    "I'm just a little old lady; don't try to dazzle me with jargon!"
    www.hrussman.entadsl.com

  8. #17
    Linux Newbie
    Join Date
    Dec 2005
    Location
    Singapore
    Posts
    234
    hi thks for ur reply,
    I would like to know how to set an alias in the .bashrc file in detail, thks

    Quote Originally Posted by hazel
    You can avoid this sort of disaster permanently by setting an alias in your .bashrc file:

    alias rm rm -i

    Then, every time you open bash (e.g. by logging in), "rm" will be redefined to mean "rm -i" and rm will always prompt you before deleting just like the DOS del command does. I have this set up myself because I don't always trust myself not to delete something by accident.
    Proper Planing is a way of success

  9. #18
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,235

    Thumbs down

    Quote Originally Posted by thcc2
    hi thks for ur reply,
    I would like to know how to set an alias in the .bashrc file in detail, thks
    In your home directory, there is a file called .bashrc. The initial dot makes it a hidden file but you can still edit it. It contains all the instructions that your bash shell will execute each time it starts up. Here's where you personalise your prompt, add aliases for commands, etc.

    Load .bashrc into your preferred editor and simply add the line:
    alias rm rm -i
    Then save and exit. The change won't have an immediate effect but it *will* work on all subsequent logins.
    "I'm just a little old lady; don't try to dazzle me with jargon!"
    www.hrussman.entadsl.com

  10. #19
    Linux Guru budman7's Avatar
    Join Date
    Oct 2004
    Location
    Knee deep in Grand Rapids, Michigan
    Posts
    3,242
    For a list of parameters for the rm command, do

    man rm

    in a terminal.
    How to know if you are a geek.
    when you respond to "get a life!" with "what's the URL?"
    - Birger

    New users read The FAQ

  11. #20
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    Hint for newbies getting the hang of rm:

    Create a ~/.deleted directory and a script called ~/bin/rm containing "/bin/mv $* ~/.deleted", and alias rm to ~/bin/rm. Then when you think you're deleting files you're just moving them to the .deleted directory. You'll have to housekeep the .deleted directory periodically.

    Alternatively, alias rm to "rm -i", although this won't help you recover files that you've said 'y' to.

    "UNIX was never designed to stop people from doing stupid things because that policy would also keep them from doing clever things." - Doug Gwyn

Page 2 of 3 FirstFirst 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •