This does a simple ping scan in the entire subnet to see which hosts │ are online.
sudo apt-get install nmap
nmap -sP 192.168.1.*
or more commonly
nmap -sn 192.168.1.0/24
Clearing out logs older than 10 days
journalctl --vacuum-time=10d
Clearing out journal more than 2 gigs
journalctl --vacuum-size=2G
Get sizes
du -h /var/log/
Clear logs that are huge
cat /dev/null > whatever_log.log
See web_servers.md
nvim -d file1.txt file2.txt`
diff
online files in vim
nvim -d <(curl -sL "https://crap.com/file1.txt") \
<(curl -sL "https://crap.com/file2.txt")
See curl.md
xev -event keyboard
find . -type f -exec grep "example" '{}' \; -print
f
= file
Encrypt: EASIEST OPTION
gpg -c file.txt
Alternative method:
openssl enc -aes-256-cbc -salt -pbkdf2 -in file .txt -out file.enc
Decrypt:
gpg -d file.gpg
Alternative Method:
add -d
to the above command
Simply add /place/with/the/file
to the $PATH
variable with the following command:
export PATH=$PATH:/place/with/the/file
du -sm * | awk '$1 > 1000'
This shows directories larger than 1 gig
telnet towel.blinkenlights.n
7z.exe e *.zip
7z.exe l -r filename.zip
To unpack a tar.gz file, you can use the tar command from the shell. Here's an example:
tar -xzf rebol.tar.gz
The result will be a new directory containing the files.
In some cases the file is just a gzip format, not tar. Then you can use:
gunzip rebol.gz
September 3,2019
zsh CTRL + R lets you search through recent commands
History
Example git
and ⇧ goes through all git
command history