Re: listing directories only?
Date: 09/06/05

Date: 6 Sep 2005 09:14:28 -0700

> Thomas Maier-Komor <> dixit:
> > try this:
> > ls -lR | grep ^d | awk '{print $9;}'
> This command displays only the name of the sub-dir, but I'd rather need
> the full path from the root, eg:
> /xxx/
> /xxx/yyy/
> /xxx/yyy/zzz
> etc.

etc what? Your specification is unclear. Either you want a trailing
slash or you dont, and where is this command supposed to "begin"?
(a little pun there..)

find `pwd` -type d -print (no slash) will run from anywhere.
You can add a slash with sed, you can sort with .. sort : >

Relevant Pages

  • Re: Directory Structure for java
    ... you're running that command from the project root. ... If they have a leading slash, ...
  • Re: Apple recommending anti-virus software for Macs?
    ... > To be ultra-safe with the 'rm' command, ... Not a bad idea for root, It would drive me nuts in my user account. ... downloads directory and executing it. ... That I type an EOF is a trivial difference versus 'sudo' exiting ...
  • Re: [ squeeze ] Grub2 RAID1 LVM2 boot failure
    ... insmod mdraid ... That UUID it's not the same that grub will use for boot. ... the `root` partition from the point of view of grub is the partition ... BTW this command is undocummented in the wiki, ...
  • Re: [opensuse] su - -c $command user ???
    ... I'd like to calculate a command-string as root and pass it with su ... into the context of a unprivileged user to run the command not as ... Basically I need to know $d after the daemonuser created and filled ... Note the echo isn't really going to be a fully valuable ...
  • Re: System-users and-groups?
    ... bin shouldn't do so much. ... was root and bin... ... Although the daemon user/group are ... as that user runs that command. ...