A small script I made so that i can list out just the directories or files in a certain directory.
- use
ruby lsImproved.rb --help
to get info about all the flags ruby lsImproved.rb
would be the same as doingls
on the present working directory-a
or-l
or-la
flags can also be used in the same way asls
-d 'Directory'
can be used tols
on the desired directory-t
accepts three values
-t files
used for listing out all files-t dirs
used for listing out the directories in specified path-t all
does the same thing asls
. Lists all- The default behaviour is
ls
like.
- If you dont provide the
-d
or-t
flag the program resorts to default behaviour i.els
on the present working directory
ruby lsImproved -la -t files -d '~/Downloads'
lists all the files in Downloads directory including all the hidden ones and in listed format
I would suggest using alias like such as
alias lsf='ruby path/to/lsImproved.rb -t files
so that it would be more convenient