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 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
listing of directories with / at end...without ls -F vasanthan UNIX for Dummies Questions & Answers 10 04-16-2008 04:34 AM
listing of directories with / ...not to use ls -F vasanthan UNIX for Advanced & Expert Users 1 04-16-2008 03:20 AM
Listing Unique directories. deepakwins UNIX for Dummies Questions & Answers 2 01-23-2008 06:14 PM
Listing directories and ${1:+$1/}* GMMike UNIX for Dummies Questions & Answers 5 01-24-2005 09:38 PM
files and directories listing bbolson UNIX for Dummies Questions & Answers 1 12-11-2001 01:30 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-10-2008
jinxor jinxor is offline
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??
  #2 (permalink)  
Old 03-11-2008
vaibhavbhat vaibhavbhat is offline
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.
  #3 (permalink)  
Old 03-11-2008
oktawik oktawik is offline
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.
  #4 (permalink)  
Old 03-11-2008
ShawnMilo ShawnMilo is offline
Registered User
  
 

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

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

find . -type d

ShawnMilo
Sponsored Links
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 11:08 PM.


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