Usefool Shell Tools
On this page you can found a lot of usefool shell tools to earn time.
Pandoc is an documents converter, he can convert a lot of scripts files in other. (like markdown to dokuwiki or latex)
Complete list of possible conversion is available here.
Fedora => sudo dnf install pandoc Debian => sudo apt install pandoc Arch => sudo pacman -S pandoc
To convert myfile.md (markdown) to dokuwiki markdown syntax.
pandoc -r commonmark -t dokuwiki myfile.md
When you type this command normally your terminal must display the new syntax of the document recently converted.
To do the same thing but this time with an different output file.
pandoc -r commonmark -t dokuwiki myfile.md -o my_outputfile
With this command your terminal don't display anything but the new file is created on the desired path.
Exa : the ls replacement
exa is an improved file lister with more features and better defaults. It uses colours to distinguish file types and metadata. It knows about symlinks, extended attributes, and Git. And it’s small, fast, and just one single binary.
On debian based
curl https://sh.rustup.rs -sSf | sh wget -c https://github.com/ogham/exa/releases/download/v0.8.0/exa-linux-x86_64-0.8.0.zip unzip exa-linux-x86_64-0.8.0.zip mv exa-linux-x86_64 /usr/local/bin/exa && chown root:root /usr/local/bin/exa
On RPM based & arch.
dnf install exa #on fedora pacman -S exa #on ArchLinux
Few good argument to use with exa.
exa -lh #ls -l equivalent with more information in header of the output exa -lhuUa # more informations like user acces/creation
To have more example of uses you can visit the official website of exa.
Bat : the cat replacement
A cat(1) clone with syntax highlighting and Git integration.
For Debian based you must download the archive on the official repository here.
# Debian dpkg -i bat_0.8.0_amd64.deb #adapt the command at the version and your architecture # ArchLinux pacman -S bat # FreeBSD pkg install bat # or built your own from BSD port cd /usr/ports/textproc/bat make install # MacOS brew install bat # Windows scoop install bat
# Display a single file bat /home/$USER/.bashrc # Read from stdin, determine the syntax automatically curl -s https://sh.rustup.rs | bat # As replacement for cat bat > note.md # quickly create a new file bat header.md content.md footer.md > document.md bat -n main.rs # show line numbers (only)
Mcrypt is a powerful and easy to use tool to encrypt your files and folder.
apt install mcrypt
mcrypt yourfile.txt # keep the password you have entered during the encryption he is necessary to unlock your files.
When it's done you get a new file with the extension .nc. It's your encrypted file.
mcrypt -d yourfile.txt.nc #type your password
Nmon is an alternative at HTOP to monitor your system. It offers more functions than HTOP and he have a better look.
apt install nmon && nmon
When you launch nmon as simple user you can see options with hit "h" on the keyboard.
Tool to colorize your logs, he support a lot of extension. Use "man ccze" to have complete list.
ccze < /var/log/syslog
CCZE & tail
tail -200 /var/log/syslog | ccze -A
With combinaison of commands.
journalctl | tail -200 | ccze -A
Use CCZE to get .html page from logs
tail -100 /var/log/syslog | ccze -h > ~/syslog.html