[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 313
  • Last Modified:

Display pathnames in Unix

How do I include the pathname in the display that results from the following UNIX command:

ls -R|grep '.\.c'
0
jkawah
Asked:
jkawah
1 Solution
 
tfewsterCommented:
find . -name "*.c*"   will match the same file list  (filenames containing ".c"), and "find" returns the path as well.

Of course, if you only want files _ending_ in ".c", the pattern would be "*.c"
0
 
jkawahAuthor Commented:
Thanks!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now