LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-12-2005, 10:59 AM   #1
Metablade
LQ Newbie
 
Registered: Oct 2005
Location: Los Angeles
Distribution: Enterprise
Posts: 26

Rep: Reputation: 15
Use for the alias command


Hello,

My question is, what would be a practical use for the "alias" command?

What is the syntax for this command?

Thank you,

 
Old 10-12-2005, 11:13 AM   #2
freakyg
Member
 
Registered: Apr 2005
Distribution: LFS 5.0 and 6.1
Posts: 705

Rep: Reputation: 30
Re: Use for the alias command

Quote:
Originally posted by Metablade

What is the syntax for this command?

Thank you,
Code:
# define some handy aliases
    alias ls='ls --color=auto' # add color to ls
    #alias dir='ls --color=auto --format=vertical'
    #alias vdir='ls --color=auto --format=long'
    alias ll='ls -lh' # long listing format
    alias la='ls -Ah' # list hidden files
    alias l='ls -F'   # append indicator (one of */=@|) to entries
    alias rm='rm -i'  # prompt before removing files
    alias mv='mv -i'  # prompt before overwriting files with the mv command
    alias cp='cp -i'  # prompt before overwriting files with the cp command
    alias ..='cd ..'  # to move to the parent directory just use ..
    alias fetchmail='fetchmail -vk'
    alias lynx='lynx -cfg ~/.lynx.cfg'
    alias aterm='aterm +sb -sl 50% -bg black -fg white -fn 9x15'
    alias p='$PWD'
 
Old 10-12-2005, 12:12 PM   #3
Metablade
LQ Newbie
 
Registered: Oct 2005
Location: Los Angeles
Distribution: Enterprise
Posts: 26

Original Poster
Rep: Reputation: 15
Sweet!

m(__)m

Thank you!

 
Old 10-12-2005, 12:20 PM   #4
Metablade
LQ Newbie
 
Registered: Oct 2005
Location: Los Angeles
Distribution: Enterprise
Posts: 26

Original Poster
Rep: Reputation: 15
Hmmm..
When I try to run things like 'alias la' or 'alias ls" I get nothing...

What am I doing wrong?

I assume the command 'alias' (argument) is telling linux to do something for the moment such as:
--color=auto' # add color to ls ,<-------Does this add color when I do an ls?

-Thank you


 
Old 10-12-2005, 05:44 PM   #5
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
man alias will be of some help. I'd be more explainatory but that first post looks an awful lot like homework or something...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
alias command line arguements Henster Linux - Newbie 2 07-01-2005 03:40 AM
Adding Network Interface alias from command line WireLine Fedora 2 06-08-2005 11:08 PM
alias command zeviddalop Linux - Newbie 3 01-12-2005 09:59 PM
Creating mult command alias in BASH labob Linux - Newbie 1 11-18-2004 07:37 PM
alias or function in .bashrc, which sends command to background ngomong Linux - General 1 04-23-2002 09:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration