Как определить, где находится файл в Mac

256
frogeyedpeas

Я представлю свой вопрос в двух частях, одной конкретной и еще одной общей.

Скажем, у меня есть файл, открытый в Mac-превью. Я хочу выяснить каталог, в котором находится файл. Как мне это сделать?

Кроме того, как правило, если у меня запущено приложение, есть ли способ быстро выяснить, где находится это приложение и к каким файлам (то есть, где оно находится) оно обращается?

0

1 ответ на вопрос

2
Spiff

In Preview and most other OS X GUI apps that open documents in document windows, you can Command-click on the name of the file in the titlebar of the window to get a pop-up menu showing the path to the file.

To find where a running program is, Command-click on the app's icon in the Dock. All running GUI apps show up in the Dock. You can also use this for any app in the Dock, running or not.

To find what files a given process currently has open, you can use the /Applications/Utilities/Activity Monitor.app utility. Select a process from the list of running processes, then choose View > Inspect Process, then click on the Open Files and Ports tab in the process inspector window.

If you're more Terminal-oriented, you can use the lsof(8) ("list open files") command.

Похожие вопросы