On Wed, 2 May 2001 14:46:06 -0400
Tim Holmes <[EMAIL PROTECTED]> wrote:

> Most shells have what I like to call "dumby aliases."  In the .shellrc, 
> and when I say .shellrc I mean .<YOUR_SHELL>rc file.  So if you are 
> using bash, in your .bashrc  you will find various "dumby aliases."

Just to add to Toms' excellent description below.
To see what aliases you have available just type 'alias' (Without the quotes of 
course) at you bash prompt.

Works a treat

Example

[john@john john]$ alias
alias cd..='cd ..'
alias cp='cp -i'
alias d='ls'
alias l='ls'
alias la='ls -A -k'
alias ll='ls -l'
alias ls='ls --color=auto -F'
alias lsd='ls -d */'
alias md='mkdir'
alias mv='mv -i'
alias p='cd -'
alias rd='rmdir'
alias rm='rm -i'
alias rpmip='rpm -q --provides '
alias rpmqpil='rpm -qpil '
alias rpmreb='rpm -vv --rebuild '
alias rpmwhat='rpm -q --whatprovides '
alias rpmwhich='rpm -qf `which '
alias s='cd ..'
[john@john john]$  

Cheers

John
==============

> 
> [timh@eric timh]$ cat .bashrc 
> # .bashrc
> 
> # User specific aliases and functions
> alias rm='rm -i'
> alias mv='mv -i'
> alias cp='cp -i'
> alias s='cd ..'
> alias d='ls'
> alias p='cd -'
> 
> Those are the ones that come with bash.  Cshell has the same bit
> as well as most.  Personally, I think they're a good idea.  Helps
> keep you "honest."
> 
> If you check out the man page for rm you will see, this, and other things
> as well.
> 
> OPTIONS
>        Remove (unlink) the FILE(s).
> 
>        -d, --directory
>               unlink directory, even if non-empty (super-user only)
> 
>        -f, --force
>               ignore nonexistent files, never prompt
> 
>        -i, --interactive
>               prompt before any removal
> 
>        -r, -R, --recursive
>               remove the contents of directories recursively
> 
>        -v, --verbose
>               explain what is being done
> 
>        --help display this help and exit
> 
>        --version
>               output version information and exit
> 
> As you see the -i is for interactive.  It will ask you if you're sure
> each time a new file comes across the command.  When I'm deleting cache
> for Netscape or deleting something in a directory that I'm sure I can
> wipe out, I use rm -Rf /dir.  However just like the one person commented
> a rm -rf . /* will delete the . directory, which translates to your pwd, as
> well as the / directory and everything in it!  But that's what backups are
> for! :0)
> 
> I suggets you use rm -Rfv until you're used to doing that, and are sure
> you are dealing with the right info.  -v, setting it to verbose will print
> out everything that it's just done.  So it will tell you that file <BLAH> 
> was removed.
> 
> As always I include more information then needed, but hopefully that was 
> helpful!
> tdh
> 
> 
> T. Holmes
> Unixtechs.org
> [EMAIL PROTECTED]
> 
> "Real Men use Vi."
> 
> * Jordan Elver <[EMAIL PROTECTED]> [010502 15:03]:
> | Hi,
> | How do I remove stuff i.e. rm -r folder/ without having to type yes to every 
> | file in the folder?
> | 
> | I thought there might be an alias in .bashrc but I can't see anything in 
> | there?
> | 
> | Any ideas?
> | 
> | TIA, Cheers,
> | 
> | Jord
> 
> 


-- 
"The number of UNIX installations has grown to 10, with more expected"
       (The UNIX Programmer's Manual, 2nd Edition, June 1972.)

Reply via email to