+49 (0) 89 2154 7447
Provenexpert
★★★★★
Google
★★★★★
BrandCrock | Gateway to Digital Brand

How to get full file path Linux? Get the absolute path of a file?

In this tutorial, we will guide you about how to get the Absolute Path of a File in the Linux Operating System and How to get full file path Linux.

Readlink linux command to get full file path Linux:

readlink command in Linux is used to print resolved symbolic links or canonical file names. Whenever we have a symbolic link and we want to know what full path it refers to. You could use the readlink command to display the actual path of the symbolic link.

Print value of a symbolic link or canonical file name.

Syntax:

readlink [OPTION]... FILE...
OPTION:
  -f, --canonicalize            canonicalize by following every symlink in
                                every component of the given name recursively;
                                all but the last component must exist
  -e, --canonicalize-existing   canonicalize by following every symlink in
                                every component of the given name recursively,
                                all components must exist
  -m, --canonicalize-missing    canonicalize by following every symlink in
                                every component of the given name recursively,
                                without requirements on components existence
  -n, --no-newline              do not output the trailing delimiter
  -q, --quiet
  -s, --silent                  suppress most error messages (on by default)
  -v, --verbose                 report error messages
  -z, --zero                    end each output line with NUL, not newline
      --help     display this help and exit
      --version  output version information and exit

Example

readlink -f myfile.txt

Output

/home/user/dos2021/myfile.txt

More from our latest blogs

Top 11 Shopware Alternatives for Your E-commerce Store in 2025

E-commerce platforms are not all built the same, and the platform you choose can define

Shopware Vaid Ali Sep 6, 2025

Avoiding the 3-Year Rebuild: Code Quality Practices That Save You Later

There’s an unspoken timer that starts ticking the day your product ships. At first, things

Programming Vaid Ali Aug 31, 2025

Best AI Tools for Shopify (2025): Boost Sales, Automate Tasks & Grow Faster

Shopify has made it easier than ever to start selling online, but standing out and

Shopify Vaid Ali Aug 22, 2025

The Real Tech Stack Behind Germany’s Best-Converting Stores

Some stores look beautiful. Others load fast. A few even manage both. But the ones

E-Commerce Vaid Ali Aug 15, 2025
1 2 3 4 42
Scroll to Top