About 1,090,000 results
Open links in new tab
  1. linux - How to get full path of a file? - Stack Overflow

    On Windows: Holding Shift and right clicking on a file in Windows Explorer gives you an option called Copy as Path. This will copy the full path of the file to clipboard. On Linux: You can use the …

  2. How to extract directory path from file path? - Stack Overflow

    May 25, 2011 · where you get the full path with new_path = $(dirname ${BASH_SOURCE[0]}). You change current directory with cd new_path and then run pwd to get the full path to the current directory.

  3. linux - How do I get the absolute directory of a file in Bash? - Stack ...

    110 I have written a Bash script that takes an input file as an argument and reads it. This file contains some paths (relative to its location) to other files. I would like the script to go to the folder containing …

  4. How can I generate a list of files with their absolute path in Linux?

    Oct 29, 2008 · I am writing a shell script that takes file paths as input. For this reason, I need to generate recursive file listings with full paths. For example, the file bar has the path: /home/ken/foo/bar ...

  5. bash - What does the colon do in PATH - Stack Overflow

    Mar 2, 2016 · However, ls is just a file name, bash needs the absolute path of ls in the filesystem. So bash searches for a file called ls in a list of default directories, one by one in order. A list of default …

  6. linux - Extract file basename without path and extension in bash ...

    Apr 19, 2010 · Extract file basename without path and extension in bash [duplicate] Asked 15 years, 8 months ago Modified 2 years, 5 months ago Viewed 744k times

  7. How to permanently set $PATH on Linux/Unix [closed]

    On Linux, how can I add a directory to the $PATH so it remains persistent across different sessions? Background I'm trying to add a directory to my path so it will ...

  8. How do I remove the file suffix and path portion from a path string in ...

    Given a string file path such as /foo/fizzbuzz.bar, how would I use bash to extract just the fizzbuzz portion of said string?

  9. Difference between forward slash (/) and backslash (\) in file path

    Jan 31, 2024 · I was wondering about the difference between \\ and / in file paths. I have noticed that sometimes a path contains /and sometimes it is with \\. It would be great if anyone can explain when …

  10. linux - Limit on file name length in bash - Stack Overflow

    The following questions are meant for bash and linux only: Is there a limit on the number of characters in the absolute path name of a file? Is there a limit on the number of characters for the