Skip to content

Commit 88c1da2

Browse files
committed
init
0 parents  commit 88c1da2

30 files changed

+2343
-0
lines changed

.gr

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
skipdir: test

CONFIG.pl

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
$PACKAGE="llast";
3+
$VERSION="0.2";
4+
$PROJECT="fileutils";
5+
$COPYLEFT="(c) R.Jaksa 2018 GPLv3";
6+
7+
# include "colors.pl"
8+
# include "support.pl"
9+
# include "help.pl"
10+

Makefile

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
PATH := $(PATH):UTIL
2+
SRC := $(shell find . -type f -name '*.pl' | grep -v OFF/ | xargs grep -l '\#!' | cut -b3-)
3+
BIN := $(SRC:%.pl=%)
4+
5+
all: $(BIN) ll README.md
6+
7+
%: %.pl *.pl
8+
perlpp $< > $@
9+
@chmod 755 $@
10+
11+
ll: llast
12+
ln -s llast ll
13+
14+
IMG := ![]\(test/sshot/1.png)
15+
16+
README.md: $(BIN)
17+
$< -h | man2md | sed "s:### DESCRIPTION:$(IMG)\n\n### DESCRIPTION:" > $@
18+
19+
20+
21+
push: clean
22+
git add .
23+
git commit -m update
24+
git push -f origin master
25+
26+
install: all
27+
makeinstall -f $(BIN) ll
28+
29+
clean:
30+
rm -fv $(BIN) ll
31+
32+
mrproper: clean
33+
rm -fv README.md
34+

NEWS

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
0.2 - fix - filenames with spaces
3+
- fix - md5 on such filenames
4+
- add symbolic links listing
5+
- added notime support for llast
6+
- added -NUM support for llast
7+
- added size support into llast
8+
- added alphabetical and size ordering into llast
9+
- added locate
10+
- added depth and scope
11+
- included 0 output in size column
12+
- added epoch output
13+

README.md

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
### NAME
2+
llast - list last modified files
3+
4+
### USAGE
5+
llast [OPTIONS] FILE|DIR ...
6+
7+
![llast sshot](test/sshot/1.png "llast")
8+
9+
### DESCRIPTION
10+
List files and symlinks with the ISO 8601 timestamp in the order
11+
of the last modification (last=first). It is ls-wrapper preserving
12+
the coloring of filenames.
13+
14+
### OPTIONS
15+
-h This help.
16+
-v Verbose execution using STDERR.
17+
-l Long output (now alias for -sm)
18+
-8 Print only the first 8 files.
19+
-nc No-colors output.
20+
-md5 Include md5 column.
21+
-lo Look into locate database.
22+
23+
### SCOPE
24+
By default, recursive list of files and symlinks is provided. Symlinks
25+
are not followed. Paths searched by -p or -re might start with the "./",
26+
depending on the requested starting FILE/DIR. Default start dir is ".".
27+
28+
-d Print directories too.
29+
-f Files only (no symlinks).
30+
31+
-n PAT Filename glob pattern (e.g. *.c), more -n are or-combined.
32+
-p PAT Path glob pattern. The -n and -p are and-combined.
33+
-re PAT Path regex pattern.
34+
-np PAT Skip directory-path.
35+
-nre PAT Skip regex directory-paths.
36+
-i Case insensitiveness for regex and glob.
37+
38+
-nr No recursion (same as -r1)
39+
-r2 Max recursion 2 (-r0 means not even this directory).
40+
-r2-3 Recursion from level 2 to 3.
41+
-r=2 Only level 2 paths.
42+
43+
### TIME
44+
Sub-second precision of time is used for the ordering of files,
45+
unless the -min switch is used, but only the minutes precision
46+
is printed by default.
47+
48+
-min Use only minutes precision (skip seconds).
49+
-sec Print seconds too.
50+
-sub Print sub-seconds.
51+
-epoch Print UNIX epoch time.
52+
-nt Don't print time.
53+
54+
### SIZE
55+
Output filesize delimiters are: k for kilo or kibi, M for mega
56+
or mebi, G for giga or gibi.
57+
58+
-s Print file-size.
59+
-sk Print file-size in kibibytes (KiB).
60+
-sm In mebibytes (MiB).
61+
-sg In gibibytes (GiB).
62+
-met Metric output (1000-based MB, not 1024-based MiB).
63+
-sK Metric output (also -sM -sG).
64+
-sk0 Integer output, no decimals (also -sm0 -sg0 -sK0 -sM0 -sG0).
65+
66+
### ORDER
67+
By default, newest items are listed first. Multiple sorting criteria
68+
can be used, they are combined according to the rank.
69+
70+
+t Time order (default).
71+
+s Size order.
72+
+a Alphabetical order.
73+
74+
### INSTALL
75+
To install copy the llast and ll into your /bin directory.
76+
77+
### VERSION
78+
llast.0.2 (c) R.Jaksa 2018 GPLv3
79+

TODO

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
= Bugs =
3+
4+
* Locate -lo filenames and paths do not honor -i yet.
5+
6+
= TODO =
7+
8+
* Files with the same modification time are sorted alphabetically (common with the -min switch).
9+
* Per-directory configuration file ".llast".
10+
* Progress indicator, or maybe streaming processing of the locate output.
11+
* Printf-like format.
12+
* Reverse order.
13+
14+
= Modular structure =
15+
16+
Modules for:
17+
18+
* sorting
19+
* filtering
20+
* control
21+
* column presetation
22+
* output composition
23+

0 commit comments

Comments
 (0)