Skip to content

File management utilities in POSIX shell scripts.

Notifications You must be signed in to change notification settings

phillbush/fmutils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

                                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.

About

File management utilities in POSIX shell scripts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published