Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: ls command



On Mon, 7 Dec 1998, Michael Casinghino wrote:

> On Mon, 7 Dec 1998, Scott Stone wrote:
> 
> > On Sun, 6 Dec 1998, Michael Casinghino wrote:
> > 
> > > I want to get a recursive listing of a directory that with output like
> > > this:
> > > 
> > > dir/
> > > dir/sub1/
> > > dir/sub1/file1.1
> > > dir/sub1/file2.1
> > > dir/sub2/
> > > dir/sub2/file1.2
> > > dir/sub2/file2.2
> > > 
> > > Basically, I want it to look like the output from a 'tar -u' command.  I
> > > read the manpage for ls, but it doesn't look like it can do this. 
> > 
> > try:
> > 
> > find dir/
> 
> The output differs in the subdirectory listing
> 
> $ find dir/
> ...
> dir/sub1
> ...
> 
> $ tar -tf dir.tar
> ...
> dir/sub1/
> ...
> 
> 
> That extra slash is giving me grief.  Should I try some other tar option?

hmm, how about:

for i in `find dir/`; do echo "$i/"; done;

??

--------------------------------------------------
Scott M. Stone <sstone@example.com, sstone@example.com>
Head of TurboLinux Development/Systems Administrator
Pacific HiTech, Inc (USA) / Pacific HiTech, KK (Japan)


------------------------------------------------------------------
Next Technical Meeting: 12 December, 12:30 at Temple Univ. Japan
*NEW LOCATION* a map is available at http://www.tuj.ac.jp/maps.html
Next Nomikai: 15 January 1999, 19:30 Tengu TokyoEkiMae 03-3275-3691
------------------------------------------------------------------
more info: http://tlug.linux.or.jp                     Sponsor: PHT


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links