August 2011
10 posts
pushd and popd
A pair of very useful commands,
pushdsaves the current directory and (optionally) changes to a different one;popdreturns you to the saved directory:$ pwd /home/you/directory $ pushd /somewhere/far/away/in/the/filesystem $ pwd /somewhere/far/away/in/the/filesystem $ cd /somewhere/else $ cd /yet/another/place $ popd $ pwd /home/you/directory
I use these constantly but it seems lots of folk aren’t aware of them. Very useful if you have a couple of directories in a build tree you need to jump between and keep having to type in.
“Riots are about power, and they are about catharsis. They are not about poor parenting, or youth services being cut, or any of the other snap explanations that media pundits have been trotting out: structural inequalities, as a friend of mine remarked today, are not solved by a few pool tables. People riot because it makes them feel powerful, even if only for a night. People riot because they have spent their whole lives being told that they are good for nothing, and they realise that together they can do anything – literally, anything at all. People to whom respect has never been shown riot because they feel they have little reason to show respect themselves, and it spreads like fire on a warm summer night. And now people have lost their homes, and the country is tearing itself apart.”
—Penny Red: Panic on the streets of London.