The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 11-20-2008
johne1 johne1 is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 4
Piping syntax question

There are are lots of examples of piping output FROM the 'ls' command TO another command, but how does one pipe output TO the 'ls -l' command?

For example, use 'which' to find a file, then use 'ls -l' to view the permissions, groups, etc. in a single step:

which <filename> | ls -l

returns a long listing of the current directory, not a long listing of the filename and path returned by the 'which' command.

which <filename> | ls -l -

returns a file not found error on '-'

Suggestions, please. Thanks!

John