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 Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
listing of directories with / at end...without ls -F vasanthan UNIX for Dummies Questions & Answers 10 04-16-2008 01:34 AM
listing of directories with / ...not to use ls -F vasanthan UNIX for Advanced & Expert Users 1 04-16-2008 12:20 AM
Listing Unique directories. deepakwins UNIX for Dummies Questions & Answers 2 01-23-2008 03:14 PM
Listing directories and ${1:+$1/}* GMMike UNIX for Dummies Questions & Answers 5 01-24-2005 06:38 PM
files and directories listing bbolson UNIX for Dummies Questions & Answers 1 12-11-2001 10:30 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 03-10-2008
Registered User
 

Join Date: Mar 2008
Posts: 3
Listing directories and sub directories

Hey there, i am trying to list all the directories and sub directories of a file system, but am having a bit of trouble.

ls -lR|grep \/|grep '^\.' >> input.dat

i used this statement to list all the directories and sub directories and output them to a file
when i try to print them out on the screen it works fine

But when i try to put them to a output file, it doesnt work

Can anyone explain me why??
Reply With Quote
Forum Sponsor
  #2  
Old 03-11-2008
Registered User
 

Join Date: Mar 2008
Posts: 3
U tried your command and it works fine. I can see the output in a file as well.
Reply With Quote
  #3  
Old 03-11-2008
Registered User
 

Join Date: Mar 2008
Posts: 10
It works for me fine on solaris host. Do you have a permission to create a file in this directory? Or if the file already exists - do you have permission to write to it? Maybe you have some acl set on the file?

Regards,

-Oktawik.
Reply With Quote
  #4  
Old 03-11-2008
Registered User
 

Join Date: Jun 2006
Posts: 164
Just a side note:

If I understand what you're trying to do, it would be easier to use:

find . -type d

ShawnMilo
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:04 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0