Python Forum
a future project: recursive file list
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
a future project: recursive file list
#1
i once wrote a recursive file lister in C.  i want to make some changes to it.  but i don't want to go back to coding in C to do that.  i'd rather re-write it in Python, instead.  but i want to keep most of the features, such as the file type selector options.  here is the output from the +h or -h option
Output:
lt1/forums /home/forums 1> rls +h                         rls version 0.9.0 syntax:         rls  [options]  [names] single letter options may be combined in a single command line token:         -a      append '/' to directory names         -b      show blocks allocated         -d -D   show date (-d for local, -D for UTC)         -g -G   show group name (-G for group number)         -h -H   show this help and quit         -i      show inode         -l      show long format         -L      show number of links         -m      show mode         -n      no recursion (maxdepth=0)         -N      append nanoseconds to time (if available)         -p      show where link points to         -q      output nothing         -s      show size         -S      show time/date as raw seconds         -t -T   show time and date (-t for local, -T for UTC)         -u -U   show user name (-U for number)         -V      show version number and quit         +a      select directories (ascending)         +b      select block devices         +c      select character devices         +d      select directories (descending)         +h +H   show this help and quit         +f      select regular files         +l      select symlinks         +p      select pipes         +s      select sockets         +V      show version number and quit assignment options must be in separate command line tokens:         cd=<directory>  change to this directory (multiple)         maxdepth=<num>  maximum recursion depth lt1/forums /home/forums 2>
the options parser allows combining + and - options in the same command argument token, so, commands like rls +fl-lp are allowed (this selects regular files an symlinks, showing long format plus link reference).
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Representation of recursive list DeaD_EyE 1 2,018 Sep-24-2018, 08:27 PM
Last Post: snippsat
  PEP 572 and Future svetlanarosemond 8 5,376 Jul-16-2018, 08:40 PM
Last Post: micseydel
  a future project for some day Skaperen 7 4,097 Apr-24-2018, 03:12 AM
Last Post: Skaperen
  recursive file scan Skaperen 8 5,800 Jan-05-2018, 04:49 AM
Last Post: Skaperen
  a future project: hardlink identical files Skaperen 4 3,981 Dec-18-2017, 03:38 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020