LINUX • DEBIAN • BASH • JAVA - CHEAT SHEET v19-02-23 Update

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@wglenz·
0.000 HBD
LINUX • DEBIAN • BASH • JAVA - CHEAT SHEET v19-02-23 Update
<center>**LINUX • DEBIAN • BASH • JAVA - CHEAT SHEET**<br>A short summary of my personal favorite Linux tools.</center>
<center id="top">![Screenshot from 2019-02-14](https://files.steempeak.com/file/steempeak/wglenz/XoetrBv8-Screenshot20from202019-02-142009-58-08.png)
[Image source: Willi Glenz - Screenshot Desktop](https://files.steempeak.com/file/steempeak/wglenz/XoetrBv8-Screenshot20from202019-02-142009-58-08.png)</center>

<br>
```
# visudo
$ gnome-characters
$ mpg123 -zvC /home/userxyz/music/*
# tasksel
# tasksel --list-tasks
# service --status-all | less
# service ssh status
# service apache2 start | restart | stop
# apt-get install printer-driver-cups
# ufw status
```
<br>
|**TOOL**|**HOMEPAGE**|**DOWNLOAD**|**DOCUMENTATION**|**TUTORIAL**|
|-|-|-|-|-|
|**linux**|<a href="https://www.kernel.org/">home</a>|<a href="https://www.kernel.org/">kernel</a>|<a href="https://www.kernel.org/doc/html/latest/">docu</a>|<a href="https://www.javatpoint.com/linux-tutorial">javatpoint.com</a>|
|**debian**|<a href="https://www.debian.org">home</a>|<a href="https://www.debian.org/distrib/netinst#smallcd">smallcd</a>|<a href="https://www.debian.org/doc">docu</a>|<a href="https://www.debiantutorials.com/">debiantutorials.com</a>|
|**gnome**|<a href="https://www.gnome.org">home</a>|<a href="https://www.gnome.org/getting-gnome/">download</a>|<a href="https://help.gnome.org/">docu</a>|<a href="https://developer.gnome.org/gnome-devel-demos/stable/beginner.js.html.en">gnome.org</a>|


<br>
|**update**|<a href="https://steemit.com/linux/@wglenz/visudo-v19-02-23-update">visudo </a><a href="https://steemit.com/linux/@wglenz/timewarrior-v19-02-22-update">taskwarrior </a><a href="https://steemit.com/java/@wglenz/primitive-data-types-v19-02-21">primitive data types </a><a href="https://steemit.com/linux/@wglenz/task-and-timewarrior-v19-02-19-update">taskwarrior </a><a href="https://steemit.com/linux/@wglenz/eclipse-v19-02-18-update">eclipse </a><a href="https://steemit.com/linux/@wglenz/ssh-v19-02-17-update">ssh </a><a href="https://steemit.com/linux/@wglenz/perl-v19-02-16-update">perl </a><a href="https://steemit.com/linux/@wglenz/tiddlywiki-v19-02-14">tiddlywiki </a><a href="https://steemit.com/linux/@wglenz/shortcuts-v19-02-14-update">shortcuts </a><a href="https://steemit.com/linux/@wglenz/vim-v19-02-13-update">vim </a><a href="https://steemit.com/linux/@wglenz/crontab-v19-02-12-update">crontab </a><a href="https://steemit.com/linux/@wglenz/tripwire-v19-02-12-update">tripwire </a><a href="https://steemit.com/linux/@wglenz/sources-v19-02-10">sources </a><a href="https://steemit.com/linux/@wglenz/permaculture-v19-02-10">permaculture </a><a href="https://steemit.com/linux/@wglenz/screen-v19-02-06">screen </a><a href="https://steemit.com/linux/@wglenz/java-v19-02-02">java </a><a href="https://steemit.com/linux/@wglenz/r-v19-01-29">r </a><a href="https://steemit.com/linux/@wglenz/monitoring-v19-01-28">monitoring </a><a href="https://steemit.com/linux/@wglenz/printing-v19-01-26">cups </a><a href="https://steemit.com/linux/@wglenz/alias-v19-01-22">alias </a><a href="https://steemit.com/linux/@wglenz/network-v19-01-19">network </a><a href="https://steemit.com/linux/@wglenz/check-v1">check </a><a href="https://steemit.com/linux/@wglenz/scp-v1">scp </a><a href="https://steemit.com/linux/@wglenz/debian-v181226">debian </a><a href="https://steemit.com/linux/@wglenz/linux-from-scratch-v1">lfs </a><a href="https://steemit.com/linux/@wglenz/virtualbox-v19-01-09">virtualbox </a><a href="https://steemit.com/linux/@wglenz/python-v2">python </a><a href="https://steemit.com/linux/@wglenz/awk-v181226">awk </a><a href="https://steemit.com/linux/@wglenz/html-v1">html </a><br>this week • <a href="https://steemit.com/linux/@wglenz/visudo-v19-02-23-update">visudo </a><a href="https://steemit.com/linux/@wglenz/timewarrior-v19-02-22-update">taskwarrior </a>cherrytree <a href="https://steemit.com/java/@wglenz/primitive-data-types-v19-02-21">primitive data types </a><a href="https://steemit.com/linux/@wglenz/eclipse-v19-02-18-update">eclipse </a><br>last week • <a href="https://steemit.com/linux/@wglenz/ssh-v19-02-17-update">ssh </a><a href="https://steemit.com/linux/@wglenz/perl-v19-02-16-update">perl </a><a href="https://steemit.com/linux/@wglenz/time-and-taskwarrior-v19-02-15-update">taskwarrior </a><a href="https://steemit.com/linux/@wglenz/tiddlywiki-v19-02-14">tiddlywiki </a><a href="https://steemit.com/linux/@wglenz/shortcuts-v19-02-14-update">shortcuts </a><a href="https://steemit.com/linux/@wglenz/vim-v19-02-13-update">vim </a><a href="https://steemit.com/linux/@wglenz/eclipse-v19-02-13-update">eclipse </a><a href="https://steemit.com/linux/@wglenz/crontab-v19-02-12-update">crontab </a><a href="https://steemit.com/linux/@wglenz/tripwire-v19-02-12-update">tripwire </a>|
|---|---|
|**task**|$ task burndown.daily; task burndown.weekly; task burndown.monthly<br>$ task add project:Running Kissinger Runde; timew running start<br><a href="https://steemit.com/linux/@wglenz/timewarrior-v19-02-22-update">taskwarrior </a>|
|**cherrytree**|<a href="https://www.giuspen.com/cherrytree">homepage </a><a href="https://giuspen.com/cherrytreemanual">documentation </a>|
|**java**|<a href="https://steemit.com/java/@wglenz/primitive-data-types-v19-02-21">primitive data types </a><br><a href="https://steemit.com/linux/@wglenz/java-v19-02-02">java </a>|
|**eclipse**|^F11 alt + F11<br>^m<br><a href="https://steemit.com/linux/@wglenz/eclipse-v19-02-18-update">eclipse </a>|
|**networking**|**H** • hostname netstat ifconfig ip iwconfig<br>**N** • mtr ping traceroute nslookup<br><a href="https://steemit.com/linux/@wglenz/ssh-v19-02-17-update">ssh </a><a href="https://steemit.com/linux/@wglenz/scp-v1">scp </a>|
|**programming**|<a href="https://steemit.com/linux/@wglenz/perl-v19-02-16-update">perl </a><a href="https://steemit.com/linux/@wglenz/r-v19-01-29">r </a><a href="https://steemit.com/linux/@wglenz/python-v2">python </a><a href="https://steemit.com/linux/@wglenz/awk-v181226">awk </a><a href="https://steemit.com/linux/@wglenz/html-v1">html </a>javac txt2regex <a href="https://steemit.com/linux/@wglenz/netbeans-18-12-29">netbeans </a> intellij-idea spyder3 drjava bluefish |
|**gnu core utilities**|**basic operations** • cp dd install mv rm shred<br>**output** • cat tac nl od base32 bas64 head tail split csplit<br>**formatting** • fmt pr fold<br>**summarizing** • wc sum cksum b2sum md5sum sh1sum sha224sum sha225sum<br>**sort** • sort shuf uniq comm ptx tsort<br>**fields** • cut paste join <br>**characters** • tr expand unexpand<br>**directories** • ls dir vdir dircolors<br>**special file types** • link ln mkdir mkfifo mknod readlink rmdir unlink<br>**attributes** • chown chgrp chmod touch<br>**disk usage** • df du stat sync truncate<br>**printing** • echo printf yes<br>**conditions** • false true test expr<br>**redirection** • tee<br>**file name manipulation** • basename dirname pathchk mktemp realpath<br>**working context** • pwd stty printenv tty<br>**user information** • id logname whoami groups users who<br>**system context** • date arch nproc uname hostname hostid uptime<br>**sellinux context** • chcon runcon<br>**modified command invocation** • chroot nv nice nohub stdbuf timeout<br>**process control** • kill<br>**delaying** • sleep<br>**numeric operations** • factor numfmt seq<br><a href="https://steemit.com/linux/@wglenz/filesystem-hierarchy-standard-18-12-29">fhs </a><a href="https://www.gnu.org/software/coreutils/">coreutils </a>$ info coreutils|
|**terminal**|tilda guake tmux terminator gnome-terminal gedit gvim mcedit nano • history<br><a href="https://steemit.com/linux/@wglenz/shortcuts-v19-02-14-update">shortcuts </a><a href="https://steemit.com/linux/@wglenz/screen-v19-02-06">screen </a><a href="https://steemit.com/linux/@wglenz/alias-v19-01-22">alias </a><a href="https://steemit.com/linux/@wglenz/one-liner-v19-01-11">one-liner </a><a href="https://steemit.com/linux/@wglenz/bash-18-12-27">bash </a><a href="https://steemit.com/linux/@wglenz/fish-18-12-31">fish </a>|
|**vim**|**macro** qa :reg a @a<br>**mark** m1 '1 `1<br><a href="https://steemit.com/linux/@wglenz/vim-v19-02-13-update">vim </a>|
|**crontab**|# crontab -e<br># service cron status<br><a href="https://steemit.com/linux/@wglenz/crontab-v19-02-12-update">crontab </a>|
|**tripwire**|# tripwire --init<br># tripwire --check --verbose<br><a href="https://steemit.com/linux/@wglenz/tripwire-v19-02-12-update">tripwire </a>|
|**rsync**|$ rsync -avzP --delete --stats --exclude ’Backup*‘ /home/user/ /media/xyz<br>$ rsync -avzP --delete --stats --exclude-from '/home/user/exclude.txt'  /home/user/ /media/xyz|
|**documentation**|<a href="https://steemit.com/linux/@wglenz/sources-v19-02-10">sources </a> man info pinfo apropos whatis help history|
|**monitoring**|conky kismet bleachbit nagios zabbix cacti ganglia opennms chkrootkit |
|**configuration**|<a href="https://steemit.com/linux/@wglenz/language-settings-19-01-03">language </a><a href="https://steemit.com/linux/@wglenz/swapping-v181227">swapon </a>gnome-tweak-tool bashrc |
|**gui-apps**|libreoffice localc lowriter lobase lodraw loimpress lomath loweb gnome-todo
**printing**|<a href="https://steemit.com/linux/@wglenz/printing-v19-01-26">cups</a> • lpstat lpq lp lpr cancel • lpadmin lpmove lpc tunelp accept reject enable disable|
|**hardware**|<a href="https://steemit.com/linux/@wglenz/raspberry-pi-v19-01-10">raspi </a>raspi-config rpi-update • gnome-disks badblocks blkid fdisk • lsblk lshw lspci lsusb • hwinfo e4defrag<br><a href="https://steemit.com/linux/@wglenz/hardware-management-v1">administration </a>|
|**os**|<a href="https://steemit.com/linux/@wglenz/debian-v181226">debian </a><a href="https://steemit.com/linux/@wglenz/linux-from-scratch-v1">lfs </a>arch • <a href="https://steemit.com/linux/@wglenz/virtualbox-v19-01-09">virtualbox </a>tasksel<br><a href="https://steemit.com/linux/@wglenz/system-management-v2">administration </a>| 
|**backup**|backintime timeshift • grsync rsync|
|**user**|**U** • adduser useradd • deluser userdel • addgroup groupadd • usermod chage chfn finger whatis which w whoami passwd id<br>**G** • delgroup groupdel groups newgrp<br><a href="https://steemit.com/linux/@wglenz/user-management-v19-01-12">administration </a>|
|**multimedia**|vlc youtube-dl simplescreenrecorder |
|**processes**|kill killall • htop atop top • jobs bg fg<br><a href="https://steemit.com/linux/@wglenz/processes-v19-01-08">administration </a>| 
|**server**|<a href="https://steemit.com/linux/@wglenz/dhcp-server-v19-01-10">dhcp </a><a href="https://steemit.com/linux/@wglenz/pi-hole-server-18-12-29">pi-hole </a><a href="https://steemit.com/linux/@wglenz/raspiblitz-lightning-node-v19-01-11">raspiblitz </a><br>|
|**A**|apt-get alacarte apt apt-cache apt-config apt-key apt-cdrom archivemount asunder |
|**B**|basket bc |
|**C**|<a href="https://steemit.com/linux/@wglenz/curl-19-01-02">curl </a> cal cherrytree clear clipit cmatrix cut|
|**D**|df dmesg dpkg|
|**E**|eog exit|
|**F**|finger for free fuser|
|**G**|git glances gnome-clocks gnome-disks gparted groupmod grsync grub-mkconfig |
|**H**|hostname hostnamectl |
|**L**|<a href="https://steemit.com/linux/@wglenz/lxc-18-12-30">lxc </a>lastlog locate lsb_release lvm |
|**M**|man menulibre mc more mount |
|**N**|nl nano ncal netatop netstat nmap |
|**O**|open |
|**P**|perldoc pinfo popd pushd pwgen |
|**R**|R |
|**S**|script scp sed service set sftp shellcheck steghide stat sudo su sync  visudo|
|**T**|<a href="https://steemit.com/linux/@wglenz/tiddlywiki-v19-02-14">tiddlywiki </a>thunderbird tune2fs |
|**U**|ufw umask uniq update-alternatives updatedb uptime users |
|**V**|<a href="https://steemit.com/linux/@wglenz/visudo-v19-02-23-update">visudo </a> veracrypt vimtutor |
|**W**|watch w3m|
|**X**|xdotool xsel|


<center>**~/.bash_history**</center>
```
• alias t='clear; task; timew week; timew'
# chown userXYZ file.txt
$ cmatrix -s -u 9
$ curl rate.sx/steem@90d
$ dd if=/dev/cdrom of=/tmp/isofile.iso
$ df -hT
$ for x in *; do mv "$x" "${x,,}"; done
$ hostname; hostname -d; hostname -f; hostname -i
$ java -jar filename.jar
$ sort -t: -k1 -n /etc/passwd
$ speedtest
$ ssh -X userxyz@a.b.c.d
$ stat /home/user
$ timew start | stop | continue
$ tree ~/Downloads
$ type date; type echo
$ umask -S
$ ls -l | xsel --clipboard
$ ^z jobs fg bg

BACKUP
$ archivemount archive.tar.gz ~/mnt/
# dd if=/dev/sdABC of=/dev/sdXYZ bs=64K conv=noerror,sync
$ tar -cvzf ~/backup/backup.tar.gz ~/java
$ tar -tvf backup.tar.gz
$ ssh user@a.b.c.d "tar -zcf - /home/user/scripte" > scripte.tar.gz

CRONTAB
# crontab -e

DU
# du -hs / 2> /dev/null
$ du -h --max-depth=1 | sort -rh
$ du -b --max-depth 1 | sort -nr | perl -pe 's{([0-9]+)}{sprintf "%.1f%s", $1>=2**30? ($1/2**30, "G"): $1>=2**20? ($1/2**20, "M"): $1>=2**10? ($1/2**10, "K"): ($1, "")}e'

FIND
$ find -size +100M | less
# find /home -user userxyz -size +1G
$ find . -name "*.jpg" -exec convert {} -scale 50% +repage {} \;
$ find ~ -maxdepth 1 -type f -exec grep "^alias " '{}' \; -print
$ find ~ -maxdepth 1 -type f -mtime 3
$ find ~ -maxdepth 1 -type f -exec grep "^alias " '{}' \; -print
# find / -uid 1000 -exec chown -v 1002:1002 {} \;
# find / -user userxyz -type f -exec rm -f {} \;
$ find /etc -type f -print 2> /dev/null | less
$ find /etc/*tab -type f -print
# find /home -user userxyz -mtime -3

MAIL
# apt-get install mailutils-doc; info mailutils
$ mail
$ from

MANPAGES
$ man hier
$ man ascii

MONITORING
$ watch -d -n 5 ls -l

MD5SUM
$ md5sum abc.txt
$ md5sum abc.txt > abc.md5
$ md5sum -c abc.md5

PACKAGES
$ apt list --installed | less
$ apt list --installed | grep vim
$ apt list --installed | wc -l
$ dpkg -L vim-doc

SERVICES
# tasksel
# tasksel --list-tasks
# service --status-all | less
# service ssh status
# service cron status
# service apache2 start | restart | stop
# apt-get install printer-driver-cups
# ufw status

SUDO
# visudo 
> Defaults:userxyz timestamp_timeout=30

TASKWARRIOR & TIMEWARRIOR
$ task calendar 2019
# task 1 edit
$ timew start | stop | continue
```
👍 , , , , , , , , , ,