Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Ubuntu で 2 つのターミナルを開くと、 2ps uが表示されます。bashpid
ps u
bash
pid
bash私の問題は、ある端末からのものです。他の端末でのcwdを知るにはどうすればよいですか?
確認してもいい
/proc/<pid>/cwd
このpwdxコマンドは、指定された各プロセス ID の現在の作業ディレクトリを出力します。
pwdx
Solarisの例(Ubuntuにもコマンドがあると信じています):-
$ cd /tmp $ pwdx $$ 22281: /tmp