|
2 | 2 | ls command alternative (not a replacement). Output is either cleanly formatted table or string of null terminated file names parseable by xargs command. Default behaviour is to show only non-hidden files and directories of directory passed or current directory if no directory is given, in table format. |
3 | 3 | Written in Python for UNIX like OS |
4 | 4 | Requires Python version 3.3 or later |
5 | | -Version 1.1.2 |
| 5 | +Version 2 |
6 | 6 |
|
7 | 7 | ## Usage |
8 | 8 |
|
9 | | - usage: lsi [-h] [-t | -1 | -x] [-n | -i | -a] [-d | -f] [-v] [FILE [FILE ...]] |
10 | | - |
11 | | - ls command alternative. Output is either cleanly formatted table or string of |
12 | | - null terminated file names parseable by xargs command. Default behaviour is to |
13 | | - show only non-hidden files and directories of directory passed or current |
14 | | - directory if no directory is given, in table format. |
15 | | - |
16 | | - positional arguments: |
17 | | - FILE space separated list of any numbers of files and/or |
18 | | - directories; if not given, current directory will be |
19 | | - assumed |
20 | | - |
21 | | - optional arguments: |
22 | | - -h, --help show this help message and exit |
23 | | - -t output in table format; this is default |
24 | | - -1 output on file per line |
25 | | - -x, --xargs output will be string of null terminated file names; |
26 | | - can be used as input to other commands like xargs; |
27 | | - absense of this option makes output to be a table, |
28 | | - which is default |
29 | | - -n, --non-hidden show files and/or directories with names that does not |
30 | | - start with a dot; this is default |
31 | | - -i, --hidden show files and/or directories with names starting with |
32 | | - a dot |
33 | | - -a, --include-hidden show all files and/or directories |
34 | | - -d, --only-dir show directories only and not regular file |
35 | | - -f, --only-files show only regular files and not directories |
36 | | - -v, --version output version information and exit |
37 | | - |
| 9 | +``` |
| 10 | +lsi [-h] [-1 | -x] [-n | -i | -a] [-d | -f] [-s | -u | -t | -c | -z] |
| 11 | + [-r] [-v] |
| 12 | + [FILE [FILE ...]] |
| 13 | +
|
| 14 | +ls command alternative. Output is either cleanly formatted table or string of |
| 15 | +null terminated file names parseable by xargs command. Default behaviour is to |
| 16 | +show only non-hidden files and directories of directory passed or current |
| 17 | +directory if no directory is given, in table format. |
| 18 | +
|
| 19 | +positional arguments: |
| 20 | + FILE space separated list of any numbers of files and/or |
| 21 | + directories; if not given, current directory will be |
| 22 | + assumed |
| 23 | +
|
| 24 | +optional arguments: |
| 25 | + -h, --help show this help message and exit |
| 26 | + -1 output on file per line |
| 27 | + -x, --xargs output will be string of null terminated file names; |
| 28 | + can be used as input to other commands like xargs; |
| 29 | + absense of this option makes output to be a table, |
| 30 | + which is default |
| 31 | + -n, --non-hidden show files and/or directories with names that does not |
| 32 | + start with a dot; this is default |
| 33 | + -i, --hidden show files and/or directories with names starting with |
| 34 | + a dot |
| 35 | + -a, --include-hidden show all files and/or directories |
| 36 | + -d, --only-dir show directories only and not regular file |
| 37 | + -f, --only-files show only regular files and not directories |
| 38 | + -s sort files alphabetically in ascending order; this is |
| 39 | + default |
| 40 | + -u sort files by access time, newest first |
| 41 | + -t sort files by modification time, newest first |
| 42 | + -c sort files by time of last modification of file status |
| 43 | + information, newest first |
| 44 | + -z sort files by their size, largest first, note this |
| 45 | + works well only with regular files |
| 46 | + -r reverse order while sorting; can be used in conjuction |
| 47 | + with option -s, -u, -t or -c, in absense of these |
| 48 | + options, sort alphabetically in descending order |
| 49 | + -v, --version output version information and exit |
| 50 | +``` |
38 | 51 |
|
39 | 52 | ## Examples |
40 | 53 |
|
@@ -79,12 +92,12 @@ lsi requires Python version 3 installed before you run it |
79 | 92 |
|
80 | 93 | ## Installation |
81 | 94 |
|
82 | | -(For Ubuntu, Fedora, Linux Mint, Debian, Arch Linux and other Linux distributions including \*BSD and other UNIX like OS) |
| 95 | +(For Ubuntu, Fedora, Linux Mint, Debian, Arch Linux and other Linux distributions; \*BSD and other UNIX like OS) |
83 | 96 |
|
84 | 97 | $ git clone https://github.com/js-d-coder/lsi-python3.git |
85 | 98 | $ cd lsi-python3 |
86 | | - $ cp lsi /usr/local/bin/ |
87 | | - # chmod +x /usr/local/bin/lsi # requires root permission |
| 99 | + # cp lsi /usr/local/bin/ |
| 100 | + # chmod +x /usr/local/bin/lsi |
88 | 101 |
|
89 | 102 | ## Screenshot (lsi vs ls) |
90 | 103 |
|
|
0 commit comments