FG
💻 Software

How to retrieve the absolute path of an arbitrary file from the OS X

Fresh5 days ago
Mar 15, 202615455 views
Confidence Score0%
0%

Problem

I'm looking for a simple command that can be used within Bash to find the absolute and canonicalized path to a file on an OS X (similar to ``readlink -f'` under Linux). The following sample bash session describes a [fictitious] utility called ``abspath'` that exhibits the desired behavior: As with …

Error Output

$ pwd
/Users/guyfleegman

$ ls -lR
drwxr-xr-x  4 guyfleegman  crew  136 Oct 30 02:09 foo

./foo:
-rw-r--r--  1 guyfleegman  crew  0 Oct 30 02:07 bar.…

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to retrieve the absolute path of an arbitrary file from the OS X

Low Risk

Examples:

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment