+49 (0) 89 2154 7447
Provenexpert
★★★★★
Google
★★★★★

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

What is Agentic Commerce & How is it Revolutionizing the Shopping Experience for Consumers?

Shopping used to be an experience. Wandering through stores, examining products, weighing options. The internet

E-Commerce Vaid Ali Feb 7, 2025

DeepSeek Is Doing the Impossible. And Everyone Should Be Paying Attention!

For years, we’ve been told that the future of AI belongs to those with the

AI Vaid Ali Jan 29, 2025

How to Create an Empty file in Linux Command Line

Creating an empty file in Linux might seem like a trivial task, but it is

Linux Vaid Ali Jan 16, 2025

BrandCrock: Your Offshore Shopware Certified Partner

When it comes to selecting the right e-commerce platform, businesses often face an important decision

E-Commerce Mustafa Ali Jan 15, 2025
1 6 7 8 9 10 43
Scroll to Top