Skip to content
/ fbc Public

various commands on files filtered by their content

License

Notifications You must be signed in to change notification settings

vbsw/fbc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fbc

GoDoc Go Report Card Stability: Experimental

About

fbc (file by content) allows various commands on files filtered by their content. fbc is published on https://github.com/vbsw/fbc and https://gitlab.com/vbsw/fbc.

Copyright

Copyright 2020 - 2022, Vitali Baumtrok (vbsw@mailbox.org).

fbc is distributed under the Boost Software License, version 1.0. (See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)

fbc is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Boost Software License for more details.

Usage

fbc (INFO | ( COMMAND INPUT-DIR {OUTPUT-DIR FILTER OPTION} ))

INFO
	-h, --help        print this help
	-v, --version     print version
	-e, --example     print example
	-c, --copyright   print copyright
COMMAND
	count             count files
	cp                copy files
	mv                move files
	print             print file names
	rm                delete files
OPTION
	-o, --or          filter is OR (not AND)
	-r, --recursive   recursive file iteration
	-s, --silent      don't output errors to screen when reading files
	-t, --threads     use threads

Examples

Copy any file containing the words "alice" and "bob"

$ fbc cp ./ ../bak alice bob

Move text files containing the words "alice" and "bob"

$ fbc mv "./*.txt" ../bak alice bob

Delete text files containing the words "alice" and "bob"

$ fbc rm "./*.txt" alice bob

References