Help us understand the problem. What is going on with this article?

すべての開いているターミナルのCWDを取得 - macos

More than 1 year has passed since last update.

癖で普段から沢山ターミナルを開いています。しかし、イベントでの発表とか、ちょっとした都合で自分の端末を映像配信・録音に使うなどのため、できるだけ負担を減らす目的で全部閉じることがあります。

で、閉じる前何やってたっけ。。があるのでダンプしておくことにしよう。

lsofでcwdつき出力して、あとは良くあるフィルタのワンライナーで実施。

$ for x in $(pidof bash); do lsof -a -d cwd -p $x ; done |  grep bash | awk '{print $9}' | sort | uniq
/Users/sawanoboly
/Users/sawanoboly/develop/src/git.example.com/kafka-docker
/Users/sawanoboly/develop/src/git.example.com/zookeeper-docker/stack
/Users/sawanoboly/develop/src/git.example.com/sawanoboly/kafka-miscs
/Users/sawanoboly/develop/src/git.example.com/sawanoboly/kafka-miscs/landloop
/Users/sawanoboly/develop/src/github.com/confluentinc/cp-docker-images
/Users/sawanoboly/develop/src/github.com/getshifter/base
/Users/sawanoboly/sandbox/kafka-leaning/fluentd
/Users/sawanoboly/sandbox/spot/opencv
/Users/sawanoboly/sandbox/spot/opencv/face_recognition/examples
/Users/sawanoboly/sandbox/spinnaker

脳内コンテキスト復旧の手助けになるよう。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした