While working on my FreeAdLists personal project at home, I decided it was time to better manage my pwd efforts. I quickly grew weary and impatient (exacerbated by the fact I'm fighting a nasty cold and acute rhinitis) of changing directories so many darn times, so I decided it was time to use a stack (stack starts with 0). Here are few examples of the pushd and dirs commands, which pushes a directory and displays a stack, respectively.
# csh
# cd /
# pushd `pwd`
/ /export/home/esoft/xml/XMLDIR /opt/apps/apps1
# pushd /usr/local/popper
# dirs
/usr/local/popper / /export/home/esoft/xml/XMLDIR /opt/apps/apps1
# pwd
/usr/local/popper
Switches between the first two directories paths
# pushd
/ /usr/local/popper /export/home/esoft/xml/XMLDIR /opt/apps/apps1
# dirs
/usr/local/popper / /export/home/esoft/xml/XMLDIR /opt/apps/apps1
# pwd
# /
Moves /export/home/esoft/xml/XMLDIR to the top of the stack
# pushd +2
/export/home/esoft/xml/XMLDIR / /usr/local/popper /opt/apps/apps1
# dirs
/export/home/esoft/xml/XMLDIR / /usr/local/popper /opt/apps/apps1
# pwd
/export/home/esoft/xml/XMLDIR
This blog covers Unix system administration HOWTO tips for using inline for loops, find command, Unix scripting, configuration, SQL, various Unix-based tools, and command line interface syntax. The Unix OS supports tasks such as running hardware, device drivers, peripherals and third party applications. Share tips/comments. Read the comments. But most importantly: Read Disclaimer - Read Disclaimer.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment