You are not logged in.
What files would I need to edit in order to make every "cd" command automatically execute "ls -a" when using lxterminal? So if i moved from root to my home folder it would automatically list all files found in that folder.
Offline
You would edit your ~/.bashrc file and make an alias something like:
alias cd='cd $1 && ls -a'
(but I'm not sure about the $1 part - try it out)
Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.
Offline
You need a function - you can't pass variables to aliases.
Offline
Absolutely right there tomk. Doh!
Something like this:
cdls(){
cd $1
ls -a
}
might work?
Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.
Offline