morgan on 1 Feb 2006 17:21:05 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Interactive rm


Art,

If you're using bash you would create an alias:

alias rm="rm -i"

That will only affect the current shell. In Fedora Core and probably other linuxes you would vi /etc/bashrc and add alias rm="rm -i" to the bottom.

Changes to /etc/bashrc don't affect running shells. You're best to logout completely to make sure it takes effect everywhere.

-morgan



Art Alexion wrote:
When I first started using Linux about 5 years ago, "rm *" defaulted to
"rm -i *".

I just clumsily deleted all of the files in a directory with the numpad
-- trying to type "*.flac", I hit the enter key with the side of my
finger slightly before it hit the "." key.

How can I restore rm's default behavior so that "rm *" requires
confirmation, but "rm specified_file" does not?



------------------------------------------------------------------------

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug