bash Linux login file
Please help,... when using Pico how can I open and edit the bash Linux login file (stored in your Linux root directory). I would like to add the new commands for items listed below.
a) display contents of a directory => mycd b) display date and time => mydt c) logoff => myexit |
you ought to read man bash about how to add functions like mycd, mydt or myexit and also about the login process and what does the "linux login file" mean. see here: http://www.thegeekstuff.com/2008/10/...d-bash_logout/
__________________________________ Happy with solution ... mark as SOLVED If someone helps you, or you approve of what's posted, click the "Add to Reputation" button, on the left of the post. |
Why would you want to add a "mycd" alias that just does the same thing as the built in "ls"? Similarly, why would you want to add a "mydt" alias that just does the same thing as "date"? Wouldn't it be easier to just learn the built in commands, especially since "ls" is half the number of characters as "mycd"?
|
well its for an assignment, Linux is new to me, im trying to see exactly what i need to do, but im pretty clueless on this one....help is appreciated = )
|
In that case...
The bash login file is generally ~/.bashrc, though it can vary from distribution to distribution. You should be able to find more info with "man bash" "alias" is probably the command that you're looking for. As above, you can find info on how to use it with "man bash". |
You need to bookmark/read this http://rute.2038bug.com/index.html.gz, & bookmark/use this http://linux.die.net/man/ to research 'alias' ...
See also login file '.bash_profile' One last hint : if a filename begin with the '.' char, then it will not show up using the (bare) ls cmd; you'll need the -a switch as well. |
All times are GMT -5. The time now is 08:28 PM. |