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

If you give find an absolute path to start with, it will print absolute paths. For instance, to find all .htaccess files in the current directory: find “$(pwd)” -name .htaccess or if your shell expands $PWD to the current directory: find “$PWD” -name .htaccess find simply prepends the path it was given to a relative … Read more

awk in bash with ls and variable

This is exactly why you should not use UPPER_CASE_VARS. $PATH is a variable used by the shell to find executables on your system. As soon as you over-write it with user input, your script can no longer find anything that does not reside in whatever the input was. In this case, you entered /bin, so … Read more

tech