The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Delete a word and complete line Aejaz UNIX for Advanced & Expert Users 1 05-02-2008 01:50 PM
Using the Esc key to complete command line typing jxh461 UNIX for Dummies Questions & Answers 1 06-05-2007 07:04 PM
Path in prompt line? Leitwolf UNIX for Dummies Questions & Answers 4 04-02-2007 04:25 PM
display full unix path as part of the command line ocelot UNIX for Dummies Questions & Answers 3 10-10-2006 03:58 PM
displaying the path in the command line ocelot Shell Programming and Scripting 2 10-10-2006 03:58 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-10-2005
condor4-2 condor4-2 is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 2
ls -R command but need complete path name on each line

Can anyone help me with the following:
I need to traverse subdirectories to create a list of files with the pathname. For example, here’s what I get with a simple ls –alR command:

/MAIN/data/30007390 dte2>>ls -alR

.:

total 2

drwxrwx--- 4 ecfadmin staff 96 Oct 24 18:35 .

drwxrwx--- 37 ecfadmin staff 1024 Oct 24 18:35 ..

drwxrwx--- 2 ecfadmin staff 96 Oct 24 18:35 GroupB

drwxrwx--- 2 ecfadmin staff 96 Oct 24 18:35 GroupA



./GroupB:

total 8

drwxrwx--- 2 ecfadmin staff 96 Oct 24 18:35 .

drwxrwx--- 4 ecfadmin staff 96 Oct 24 18:35 ..

-rwxrwx--- 1 ecfadmin staff 1968 Oct 24 18:35 02050506.GZ

-rwxrwx--- 1 ecfadmin staff 1976 Oct 24 18:35 02050720.GZ



./GroupA:

total 20

drwxrwx--- 2 ecfadmin staff 96 Oct 24 18:35 .

drwxrwx--- 4 ecfadmin staff 96 Oct 24 18:35 ..

-rwxrwx--- 1 ecfadmin staff 9453 Oct 24 18:35 05050602.GZ



What I would like to get back is something with the full path name and file name:



/MAIN/data/30007390/GroupB/02050720.GZ

/MAIN/data/30007390/GroupB/02050506.GZ

/MAIN/data/30007390/GroupA/05050602.GZ

*Permissions, primary and secondary group names, dates times and sizes are not needed but don’t have to be excluded.

I’m looking for something pretty straight forward, I could write a little shell to handle it but was hoping for something a little more elegant. (I was hoping there was a version (or option) of “ls” out there that might do it).

Any help would be appreciated.
  #2 (permalink)  
Old 12-10-2005
Just Ice's Avatar
Just Ice Just Ice is offline Forum Advisor  
Lights on, brain off.
  
 

Join Date: Mar 2005
Location: in front of my computer
Posts: 637
try "find" instead ... see "man find" ...

find . -type f -print
  #3 (permalink)  
Old 12-12-2005
condor4-2 condor4-2 is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 2
That was exactly what I was looking for. It works great. Thanks very much!!!
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:30 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0