Cd is a command-line utility to change the working directory.

learn more… | top users | synonyms

1
vote
1answer
451 views

How to link a folder to create a shortcut

I have this folder: /var/www/vhosts/foo that I need to access often. If I do (I'm root): ln -s /var/www/vhosts/foo/ cd foo pwd tells me /root/foo What can I do to really go into the folder ...
8
votes
3answers
5k views

~ is $HOME, but sometimes?

This is kind of a trivial and dumb question. cd ~ does the same thing as cd $HOME which is also the same as cd /home/tandu However, cd ~not-tandu changes to /home/not-tandu Is this ...
4
votes
2answers
343 views

Force change of a user's cwd as root

I'm looking to change a user's process such that I can set it's cwd. Related, and secondary to the question, I have a filesystem I want to unmount but a user is sitting on it with a bash process. I ...
15
votes
2answers
2k views

What is the bash shortcut to change to the previous directory?

Sadly, I only learned about this last year by stumbling upon it randomly on the internet. I use it so infrequently that I always forget what it is by the time I need it again. How do you change to ...
3
votes
2answers
504 views

Conflict between `pushd .` and `cd -`

I am a happy user of the cd - command to go to the previous directory. At the same time I like pushd . and popd. However, when I want to remember the current working directory by means of pushd ., I ...
5
votes
1answer
639 views

Can't get directory listing of folder I have permissions to

I was having some permission problems and used the following command on directory Media: chmod -R ugo+r Media It didn't help so then I did: chmod -R 775 Media Now I get this error when I try to ...
3
votes
5answers
901 views

Directory is not opening with cd command

I have a directory in Desktop named Project. I tried opening it using the cd command but it is not opening. What's the reason? Check the screenshot. The directory has all the required permissions. I ...
6
votes
1answer
495 views

Show message when cd into specific directory

How can I display a message when I cd into a specific directory? This directory is a local one, and I just need a reminder when I go into it from the terminal.
0
votes
2answers
73 views

Creating an Ubuntu Live CD through SUSE Linux

How can I create a live Ubuntu 11.10 CD on SUSE?
5
votes
1answer
202 views

Any cd shortcut to switch an intermediate directory in current path?

if I have current path as a long one..and I want to switch to a directory with just one word from path replaced by something else..like say when using maven , I want to switch from main path to test ...
6
votes
2answers
425 views

Why `.` is displayed by `ls`?

After reading the question When you type “ls -a”, what is the significance of “.” and “..”?, I have a similar one. Why to display .? I mean, is there any directory where cd . would not work? How is ...
17
votes
1answer
2k views

Execute bash scripts on entering a directory

What is the best way to execute a script when entering into a directory? When I move into a new directory I would like bash to execute the projectSettings.bash script much like RVM does.
3
votes
1answer
264 views

bash: cd to the most recently modified child directory

Wondering if there's an easy and/or portable way to say "change to the most recently modified child directory." I can use ls and awk but there's probably a better way. cd $( ls -ltrd */ | tail -1 | ...
2
votes
1answer
2k views

Why can't list file/directory relative to .. from a symbolic link directory (No such file or directory)?

I have a /usr/tomcat6/logs directory linked to /var/log/tomcat6. When I changed directory to /usr/tomcat6/logs and try to ls files using a relative pathname ../conf/Catalina/localhost, a No such file ...
4
votes
1answer
885 views

changing current working dir with a script

I've read this question and answer, but it doesn't quit fit my problem, even tho it's similar. I'm writing a script (called cpj) that will launch one of my current projects. I have about 5 of them. ...
3
votes
1answer
1k views

What is the best touch screen kiosk solution?

I'm a web developer and I'm looking for the best stripped-down linux experience that provides a full-screen experience for touch screens. I'll be looking for: a robust experience that stops people ...
14
votes
3answers
2k views

Changing parent directory (../) with symlinks

I have a symlink ~/link -> ~/a/really/long/path When I do cd ~/link cd .. it takes me to ~ but I want to go to ~/a/really/long Is there a way to do this? I am using bash.