[Novalug] question about ls

Nino R. Pereira ninorpereira at gmail.com
Mon Jan 16 12:43:39 EST 2012


On 01/16/2012 12:17 PM, How7 wrote:
> Recursive might do well enough for your needs.

ls -lR actually does too much. I don't want to go into the
sub-directories to see the files. The reason is that if you have too
many files in these sub-directories, the info slides off the screen
and you don't see it any more.

I was looking for the command because I forget what's in
the different places. I sort of remember its name, but the details.
So, I want to do a command like this:

ls --the-right-option cryst*

and get out:

crystals
  sub1 sub2 .... file1 file2 ...

It's find to get it on a line (tree gives it in a tree).

Then, when I know which sub-directory I want to go into, I'd do

cd crystals/sub1

and do ls -tor so that I get the file I last worked on at the bottom of 
the screen.

Thanks to all who commented.

It's a pleasure to see that there's still so much interest, and so much 
good info,
coming from a very basic question of a type that I have regularly.

Long live the Novalug mailing list!

Nino


ls -lR
> ~/cprogs>   mkdir x
>
> ~/cprogs>   cd x
>
> ~/cprogs/x>   touch crystf1 crystf2
>
> ~/cprogs/x>   mkdir crystal1 crystal2
>
> ~/cprogs/x>   cd crystal1
>
> ~/cprogs/x/crystal1>   touch f1 f2 f3 f4
>
> ~/cprogs/x/crystal1>   cd ../crystal2
>
> ~/cprogs/x/crystal2>   touch f1 f2 f3 f4
>
> ~/cprogs/x/crystal2>   cd ../
>
> ~/cprogs/x>   ls -Rl
> .:
> total 8
> drwxrwxr-x. 2 VHow VHow 4096 Jan 16 11:29 crystal1
> drwxrwxr-x. 2 VHow VHow 4096 Jan 16 11:29 crystal2
> -rw-rw-r--. 1 VHow VHow    0 Jan 16 11:27 crystf1
> -rw-rw-r--. 1 VHow VHow    0 Jan 16 11:27 crystf2
>
> ./crystal1:
> total 0
> -rw-rw-r--. 1 VHow VHow 0 Jan 16 11:29 f1
> -rw-rw-r--. 1 VHow VHow 0 Jan 16 11:29 f2
> -rw-rw-r--. 1 VHow VHow 0 Jan 16 11:29 f3
> -rw-rw-r--. 1 VHow VHow 0 Jan 16 11:29 f4
>
> ./crystal2:
> total 0
> -rw-rw-r--. 1 VHow VHow 0 Jan 16 11:29 f1
> -rw-rw-r--. 1 VHow VHow 0 Jan 16 11:29 f2
> -rw-rw-r--. 1 VHow VHow 0 Jan 16 11:29 f3
> -rw-rw-r--. 1 VHow VHow 0 Jan 16 11:29 f4
>
> ~/cprogs/x>
>
> _______________________________________________
> Novalug mailing list
> Novalug at calypso.tux.org
> http://calypso.tux.org/mailman/listinfo/novalug



More information about the Novalug mailing list