December 23rd, 2009
4:01 pm
How to list files with full path in Linux

Posted under Linux
Tags ,

Here is one way which also illustrates the use of the double backslash command substitution mechanism, whereby an embedded shell command in backquotes is replaced by the output of executing it :-

ls -lR `pwd`/* | grep 'epdfview'

 

The pwd command is expanded and replaced with the current working folder as the ls command is executed. In this example, the output is piped through the grep command to search for a file – this is for illustration, as you would normally do this with the find command as shown here.

Comments Off on How to list files with full path in Linux

Comments are closed.