LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-15-2008, 07:42 PM   #1
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 472

Rep: Reputation: 30
Question 'ls' help needed


How to have 'ls' print full path name of directories and files like below?
(d=directory, sd=subdirectory).

/d
/d/sd1
/d/sd1/file11.c
/d/sd2
/d/sd2/file12.c

TIA

Last edited by concoran; 05-15-2008 at 07:48 PM.
 
Old 05-15-2008, 07:46 PM   #2
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
Try:
Quote:
ls -R
Other than that look at:

Quote:
man ls
 
Old 05-15-2008, 08:12 PM   #3
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Rep: Reputation: 38
Code:
find ./ -true
 
Old 05-15-2008, 08:20 PM   #4
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 472

Original Poster
Rep: Reputation: 30
lazlow, -R is recursive which of course would be in the options. however, i am not able to figure out an option from 'man ls' as to how to print the full file path.
 
Old 05-15-2008, 08:27 PM   #5
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 472

Original Poster
Rep: Reputation: 30
slowcoder : thanks dude. This is probably what I wanted. I'll post if I have any questions. Thanks again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can 'ls' command be recursive? Hailey's_Comet Linux - Newbie 3 10-01-2006 01:29 AM
'ls' and others cause segmentation fault ErrorBound Debian 6 09-26-2006 03:27 PM
'ls' in Linux vs. 'dir' in M$ gvaught Linux - Newbie 14 11-19-2005 10:59 AM
alias cs='cd $1; ls' milanche Linux - Newbie 11 09-13-2005 06:57 PM
'ls' command... sramelyk Slackware 7 10-01-2003 01:45 PM


All times are GMT -5. The time now is 04:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration