Re: How to find dirs with single item

2014-06-01 Thread Alois Mahdal
On Thu, 29 May 2014 14:31:03 -0500 Dennis Wicks wrote: > Can't quite figure out how to do this. > > I'd like to be able to scan a Volume or directory and find > all directories that have only one item in them. Either > directory or file. > > Any ideas?? This one * wraps around find utilit

Re: How to find dirs with single item

2014-05-30 Thread Chris Angelico
On Fri, May 30, 2014 at 9:20 PM, Marko Randjelovic wrote: >> Can you try the Python script on that, please? File system encodings >> can be a bit of a pain at times. If it doesn't work as "python", try >> "python3", as the two are a bit different as regards Unicode. >> >> ChrisA >> >> > > No probl

Re: How to find dirs with single item

2014-05-30 Thread Marko Randjelovic
On Fri, 30 May 2014 17:17:29 +1000 Chris Angelico wrote: > On Fri, May 30, 2014 at 3:38 PM, Marko Randjelovic wrote: > > On Thu, 29 May 2014 22:43:29 +0100 > > Clive Standbridge wrote: > > > >> find temp |sed 's|[^/]*$||' |sort |uniq -u > > > > This doesn't work on this directory. > > > > Can

Re: How to find dirs with single item

2014-05-30 Thread Chris Angelico
On Fri, May 30, 2014 at 3:38 PM, Marko Randjelovic wrote: > On Thu, 29 May 2014 22:43:29 +0100 > Clive Standbridge wrote: > >> find temp |sed 's|[^/]*$||' |sort |uniq -u > > This doesn't work on this directory. > Can you try the Python script on that, please? File system encodings can be a bit o

Re: How to find dirs with single item

2014-05-29 Thread Marko Randjelovic
On Thu, 29 May 2014 22:43:29 +0100 Clive Standbridge wrote: > find temp |sed 's|[^/]*$||' |sort |uniq -u This doesn't work on this directory. $ find cenovnici |sed 's|[^/]*$||' |sort |uniq -u cenovnici/comtel_2011-12-20/Aktivna mre� cenovnici/comtel_2011-12-20/Brand ra cenovnici/comtel_2011-12

Re: How to find dirs with single item

2014-05-29 Thread Chris Angelico
On Fri, May 30, 2014 at 8:32 AM, Steve Litt wrote: > On Thu, 29 May 2014 14:31:03 -0500 > Dennis Wicks wrote: > >> Can't quite figure out how to do this. >> >> I'd like to be able to scan a Volume or directory and find >> all directories that have only one item in them. Either >> directory or fil

Re: How to find dirs with single item

2014-05-29 Thread Steve Litt
On Thu, 29 May 2014 14:31:03 -0500 Dennis Wicks wrote: > Can't quite figure out how to do this. > > I'd like to be able to scan a Volume or directory and find > all directories that have only one item in them. Either > directory or file. > > Any ideas?? > > TIA! > Dennis If you're willing t

Re: Re: How to find dirs with single item

2014-05-29 Thread Clive Standbridge
> Hi. > > On Thu, 29 May 2014 14:31:03 -0500 > Dennis Wicks wrote: > > > Can't quite figure out how to do this. > > > > I'd like to be able to scan a Volume or directory and find > > all directories that have only one item in them. Either > > directory or file. > > Try this (yep, links shou

Re: How to find dirs with single item

2014-05-29 Thread Bob Proulx
Reco wrote: > Dennis Wicks wrote: > > I'd like to be able to scan a Volume or directory and find > > all directories that have only one item in them. Either > > directory or file. > > Try this (yep, links should be 3, not 1): > > find -type d -links 3 Good try. That will almost work. Using

Re: How to find dirs with single item

2014-05-29 Thread Bob Proulx
Dennis Wicks wrote: > I'd like to be able to scan a Volume or directory and find all directories > that have only one item in them. Either directory or file. What is a "Volume"? I immediately think of an LVM volume group. But that isn't exposed as a file system. Technically speaking a directory

Re: How to find dirs with single item

2014-05-29 Thread Reco
Hi. On Thu, 29 May 2014 14:31:03 -0500 Dennis Wicks wrote: > Can't quite figure out how to do this. > > I'd like to be able to scan a Volume or directory and find > all directories that have only one item in them. Either > directory or file. Try this (yep, links should be 3, not 1): find

How to find dirs with single item

2014-05-29 Thread Dennis Wicks
Can't quite figure out how to do this. I'd like to be able to scan a Volume or directory and find all directories that have only one item in them. Either directory or file. Any ideas?? TIA! Dennis -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscr