Quick Copy file path under Mac OS x

Source: Internet
Author: User



The file path represents the location of the file in the file system, which is inevitably required by Linux programmers operating on the command line or by the vast majority of users who use Windows.



The path of copying the current directory on Windows has a particularly convenient way, only need to click the path bar with the mouse, it will automatically become like "D:\Downloads\tmp" such as the path, if you want to copy the file path, only need to add directory path and file name together, Linux is also very convenient,readlink -f yourfilewill print out the absolute path of the file, although the Mac can also be used under the command line Greadlink (Mac on the Readlink and Linux features are not the same, greadlink meaning is GNU's readlink, Consistent with Readlink on Linux), but this is obviously not the best solution, after all, Mac is the best combination of graphics and command line, the preferred solution in the graphical interface to solve the problem



Search the next Baidu, roughly to the following two kinds of 3 programs


    • Right click on the file, choose Show profile to see the directory of the file, which is the same as clicking on Windows on the path, but it is not easy to use, because it shows only the path of the directory where the file, the absolute path of the file also need to add a filename
    • Drag the file into the browser, the file path will be displayed in the Address bar
    • Open the text terminal program, drag the file in, the path will be automatically printed out


Each of the above methods have advantages and disadvantages, I expect the best solution should be the right mouse button click on the file, menu directly appearCopy pathoptions, click the file path is copied to the Clipboard, is not a one go feeling, in fact, the MAC system itself for us to provide such a way, just need a little bit of skill, We need to use automator here.



Open the Automator in the Application folder, select the File menu, create a new service, as follows






In the left Action Bar Copy to clipboard, locate the action and drag to the right, as follows






There are two places to modify, "services" received selected as files or folders, located in Finder,cmd+ssaved, namedCopy path, finished!



How to use it? In the Finder to find a random file, click the right mouse button, see if the service options appearCopy path, the following






After clicking the file path is copied to the Clipboard, find a place to paste to see if the result is not what you want, if you want to delete the service, go to the~/Library/Services/directory, delete the corresponding workflow file can be



Finally I want to vomit trough, this question troubled me for a long time, in fact, I always want to use Automator to solve this problem, but automator so many operations I do not have a closer look, whether it is Baidu or Google searchMac Copy file path such keywords, Search method is always only I gave a few, until one day I put this problem told a foreign classmate, he search on Googlecopy file path in mac, all solved



So sometimes don't blame the search engine, only blame ourselves not to give the best answer



Quick Copy file path under Mac OS x


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.