-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
52 lines (37 loc) · 1.76 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
fmutils
fmutils is a set of public domain POSIX scripts implementing some file
management related utilities. There are man pages for each script.
The scripts are the following.
• bulkrename: Bulk rename files with your text editor.
• pick: Interactivelly select options.
• preview: Generate text preview of a file to be used by lf(1) or ranger(1).
• skel: Create a template file in the current directory.
• trash: Move files to trash following XDG trash specification.
• untrash: Remove files from trash following XDG trash specification.
• unpack: Unarchive archived files (.zip, .rar, .tar.gz, etc).
§ Running FMUtils
The following are examples of how to use FMUtils.
Bulk rename all files in the current directory:
$ bulkrename *
Bulk rename all .jpg files in the ~/Downloads directory:
$ bulkrename ~/Downloads/*.jpg
Pick can be used to interactivelly remove files with rm(1). This
example is equivalent to `rm -i`, but can be used with other commands
that, unlike rm(1), does not provide a -i option.
$ rm $(pick *)
The previous example rely on the condition that each filename does not
contain space on it. The following example avoid this by using a
quotion option, such as -q on pick(1), and a pipe into xargs(1):
$ pick -q * | xargs rm
Add the following line to your ~/.config/lf/lfrc to use preview(1) as
file previewer.
set previewer preview
Move all .jpg files to trash:
$ trash *.jpg
Remove all .jpg files from trash (the environment variable $TRASH is
supposed to have the path of the trash)
$ untrash $TRASH/files/*.jpg
Extract the content of file.zip into your home directory.
$ unpack file.zip $HOME
§ License
This software is in public domain and is provided AS IS, with NO WARRANTY.