Tools
find
Sample: Find multiple files/folders/by size
$find /path -type d \( -name "foldername1" -o -name "foldername2" \ )
find and remove on the fly
find /path -name "filename-to-delete" -type f -exec rm -rf {} \;
find by size over 500MB and list them into Textfile
find / -size +500M -type f > /big-files.txt
grep
Sample: By default the Linux and Unix Config Files written with comments for help but somtimes its too much! Comments mostly starting with "#" to filter them out do:
grep -v '^#' config
Sytem Echos NOW only active Settings!! That's easy to control for bugs..
tar
to tar do:
tar -cvzf backup.tgz /home/
To boost the tar on cron jobs remove the "-v" Switch
= pigz
on Multi CPU Servers (Bare Metal) you can compress TAR-Files with PIGZ it offers Multi CORE Usage against TAR
This saves Time, Energy and Space!
enter:
pigz -9 backup.tar <pre> At the htop Process Viewer you can view the usage! ==== bash scripts ==== Header: <pre> #!/bin/bash #set interpreter date=`/bin/date +%Y%m%d-%H%M%S` #set data-time variable for $date
rsync
Sync Path, Drives and mounted Networks: Sync with Human readable Output, can be logged to a Log!
rsync -av /source/ /destination
To BOOST I/O DON'T use COMPRESS! "-z" cause the System Pause Transmissions during compress!! On Cronjobs remove the "-v" this BOOST the rsync TOO!
rsync -a /source/ /destination #fastest!