current working directory of a process

learn more… | top users | synonyms

1
vote
1answer
39 views

Can I start a background process with a specific working directory?

Say I have this structure /masterscript /a/script1 /a/b/script2 In masterscript I spawn the other scripts as background processes: "/a/script1" & "/a/b/script2" & The problem is that ...
2
votes
2answers
51 views

Create an absolute symbolic link to the current directory

I am now under a directory with very long path. For future visiting it quicker, I would like to create a link to it. I tried ln -s . ~/mylink ~/mylink actually links to ~. So can I expand ~ into ...
2
votes
1answer
50 views

The current path of a process

Suppose I write a program, which outputs a file under a relative path (as opposed to a full/absolute path) - let's say, the current path. Then I compile it and store the executable under some dir ...
6
votes
3answers
258 views

`/proc/$PID/cwd` : is there a POSIX equivalent?

Linux has a /proc directory and file‑system, which as far as I can tell, is not part of POSIX. In each /proc/$PID subdirectories, is a symbolic link, cwd, pointing to the actual working directory of ...
2
votes
2answers
133 views

Tmux config not retaining PWD on new-window or window split

So I'm trying to update my .tmux.conf file to reflect the change for -c in new-window. I've added this to my conf and it's not working unfortunately. My new windows and panes always start in ~/: # ...
18
votes
3answers
4k views

Find out current working directory of a running process?

What command(s) can one use to find out the current working directory (CWD) of a running process? These would be commands you could use externally from the process.
1
vote
8answers
136 views

remove content of directory in elegant way

I would like to remove all content of the current working directory. How to do it in efficient and elegant way? I have several files, directories and some of them starts with dot, like: touch .abc; ...
4
votes
2answers
913 views

Resolving symbolic links (pwd)

Say I do the following: cd /some/path ln -s /target/path symbolic_name If then do: cd /some/path cd symbolic_name pwd I get: /some/path/symblic_name and not: /target/path Is there a way to ...