Comments - most recent first
(Please feel free to answer questions posted by others!)
New Guy (31 Oct 2012, 18:40)
How long does an alias command last? For example: alias home=cd. How long
would I be able to type home and return home with erroring out? Just my
current session or does it last forever?
Thanks.
Namchy (14 Aug 2012, 09:19)
Grat work, Sir!
Thank you.
theophilu kakero (10 Apr 2012, 20:50)
help mi to write a linux script dat prompt users to login and it check if
password and username are correct
ahmad (24 Feb 2012, 15:14)
I would like to thank you for such a good stuff you've written
Tauseef (10 Feb 2012, 13:33)
how to create an aliase where using that aliase we want to create a script
?
Bhatt Bipin (13 Jan 2012, 04:35)
It is very helpful to make DOS like command.
Thank you.
Jam (25 Oct 2011, 22:10)
I want to create an alias that will only be valid for my current login
session such that when I type the letters It at the command line it will
run the command Is -lat How can I do this
Kabilan Kannan (20 Oct 2011, 21:23)
The site is really awesome. Thanks Dr Bob :)
Akshay (14 Oct 2011, 09:35)
if you want to set the alias's permanently edit your ~/.bashrc add them..
or use
echo alias cls='clear' >> ~/.bashrc
and remember ">>" is very important if > is used you'l be totally
f***ed up
Bob Rankin (30 May 2011, 11:19)
The bash manpage says this:
When bash is invoked as an interactive login shell, it first reads and
executes commands from the file /etc/profile, if that file exists. After
reading that file, it looks for ~/.bash_profile, ~/.bash_login, and
~/.profile, in that order, and reads and executes commands from the first
one that exists and is readable.
For an interactive shell that is NOT a login shell, bash reads and executes
commands from ~/.bashrc, if that file exists.
Clear as mud? :-)
CENG.Zeinab (14 May 2011, 05:51)
Please, I need to build a bash command cgrep that search the indicated
files using color, ignoring cases and showing the line number.I am
requested to add a manual for this command.Help me with that,thanks
Dan (24 Apr 2011, 03:19)
Hi Bob,
Can u tell me whr i can find .profile (i mean wht is the path for this
file).
gunjankapoor (13 Apr 2011, 05:51)
I want to save the alias commands so that when i again open a terminal, all
the alias commands should be there. So please let me know how to do that.
!codemonkey (06 Mar 2011, 14:24)
.bashrc and .profile have similar functions. which one you have depends on
which shell you are using.
Tod (14 Jan 2011, 18:58)
Sorry, answered my own question. .profile auto-executes the command...
Tod (14 Jan 2011, 18:56)
Hello,
Good stuff. What is the difference between .profile and bashrc? I created
a bashrc file for my aliases which works fine but wondering if .profile is
a better way for some reason.
Bulfennuh (30 Nov 2010, 01:57)
Very nicce!
dave the guru (27 Jul 2010, 00:04)
bob great tip but if you have 2000+ linux servers how to achieve this
automatically - build an automatic login script?
aluku (25 May 2010, 01:46)
good for starters!
I welcome your comments. However... I am puzzled by many people
who say "Please send me the Linux tutorial." This website *is* your Linux Tutorial! Read everything here, learn
all you can, ask questions if you like. But don't ask me to send what you already have. :-)
NO SPAM! If you post garbage, it will be deleted, and you will be banned.