GNU Coreutils
Apply Advanced GNU coreutils patch to display cp
and mv
commands with progress bars.
AWK
-
in 1970’s
-
Scripting languague to do quick and dirty tasks like counting and reporting from files.
-
awk
is superset ofgrep
-
shorter and better than writing python script
-
"MS-DOS was a pretty pathetic operating system" Microsoft has left the chat
-
A lovestory
Do not use cat.
Use cat <file> | grep -i
is unoptimized. We are calling 2 programs.
Use grep <pattern> <file>
-
cat is for
concatination
getting combined output from multiple files-
Use
<
ascat
alternative
-
> will clear the contents of a the file. Use < with caution. Do not make type
|
- How to write and install your own manpages?
-
MANPATH
environment variable and toolhttps://www.cyberciti.biz/faq/linux-unix-creating-a-manpage/
- List Recursively?
-
ls -R
- How to exclude a directory with ripgrep?
-
rg --pretty --files-with-matches abbr --glob '!docs/'
Test hash of downloads?
hash="some hash value from internet"
[[ $(sha256sum xyz.tar.gzip | awk '{print $1}') == ${hash} ]] \
&& echo "ok" \
|| echo "NOT OK"
extract audio from
mkv
filesfind . -type f -name "*.mkv" \
-exec bash -c 'FILE="$1"; \
ffmpeg -i "${FILE}" -vn -c:a libmp3lame \
-y "${FILE%.mkv}.mp3";' _ '{}' \;
convert whitespaces (tabs, spaces, newlines) to Newline characters
sed -r 's/\s+/\n/g'
add Album art to music files?
ffmpeg -i input.mp3 -i cover.jpg -map_metadata 0 -map 0 -map 1 output.mp3
ffprobe -show_streams -show_format DV06xx.avi
ffmpeg -i destination.mp4
ripgrep
rg
--pretty (1)
--files-with-matches (2)
abbr
--glob (3)
'!docs/'
1 | Use colors with pager less |
2 | files-without-matches is also an option |
3 | Do not include these directories in search |