===================================================================================
============================
[kernel and other cleanups after deletions]
sudo apt autoclean
sudo apt autoremove --purge
[clear temporary files]
sudo find /tmp -type f -delete
[clear miscellaneous detritus]
dpkg -l | grep '^rc' | awk '{print $2}' | sudo xargs dpkg --purge
[clear the thumbnail cache]
rm -v -f ~/.cache/thumbnails/*/*.png ~/.thumbnails/*/*.png
[clear DNS cache]
sudo systemd-resolve --flush-caches
[flush journald]
sudo journalctl --rotate
sudo journalctl --vacuum-time=1s
[manual SSD TRIM (use this command ONLY if you are using an SSD)]
sudo fstrim -av
===================================================================================
============================
[to clean & update]
sudo apt-get clean ; sudo apt-get update ; sudo apt-get check ; sudo apt-get
autoremove -y
sudo apt-get autoremove --purge
sudo apt dist-upgrade
===================================================================================
============================
[startup system process]
sudo systemd-analyze critical-chain
systemd-analyze
systemd-analyze blame
ps aux | grep nm-applet
===================================================================================
============================
[rapid photo downloader full screen]
sudo wmctrl -r Rapid Photo Downloader -e 0,0,0,1280,800
===================================================================================
============================
[to poweroff external drive]
udisksctl power-off -b /dev/sdx
===================================================================================
============================
[blockclear]
sudo dd if=/dev/zero of=/dev/sdb1 bs=1000000 count=50
===================================================================================
============================
[audio settings]
qjackctl
===================================================================================
============================
[system info]
sudo dmidecode -t bios -q
hostnamectl
sudo neofetch
sudo dpkg --list | grep linux-image
===================================================================================
============================
[remove unwanted files]
sudo dpkg --purge $(dpkg -l | awk '/^rc/{print $2}')
$(for tag in "linux-image" "linux-headers"; do dpkg-query -W -f'${Package}\n'
"$tag-[0-9]*.[0-9]*.[0-9]*" | sort -V | awk 'index($0,c){exit} //' c=$(uname -r |
cut -d- -f1,2); done)
===================================================================================
============================
[file organizing commands]
sudo df -h
sudo df -h | awk '{print $5 " " $6}' | sort -n | tail -5
sudo du -k /var/log | sort -n | tail -5
===================================================================================
============================
[run setup file]
sudo ~/RetroPie-Setup/retropie_setup.sh
export DBUS_FATAL_WARNINGS=0
unset XMODIFIERS
===================================================================================
============================
sudo apt-get update
The update command updates the package list with the latest available versions
It won't upgrade the installed packages just update the package list with a new
version
To upgrade need to run the upgrade command
sudo apt-get upgrade
To update the already installed packages to the latest available version
It will upgrade only the installed packages that already available to the latest
version version
If the dependencies are missed the current version will be kept without any upgrade
sudo apt-get dist-upgrade
To update the already installed packages to the latest available version with
required dependencies
It will automatically install the required additional packages and dependencies and
also removes the already installed packages to make the clear upgrade
sudo apt-get full-upgrade
full-upgrade performs the upgrade function but may also remove installed packages
if required to resolve a package conflict.
sudo apt-get do-release-upgrade
It can upgrade the release version of ubuntu for example if you want to upgrade
ubuntu 18.04 to 20.04 we can run do-release-upgrade
To use this command, the system must first be fully upgraded. To do that, you
should first run sudo apt-get upgrade, followed by sudo apt-get dist-upgrade
===================================================================================
============================
dpkg --get-selections | grep hold
[package]
sudo apt-get remove
[list]
dpkg --list
[full remove]
sudo apt-get purge
[list]
ls
ls --color=auto
alias ls="ls --color=auto"
[takes to root dir]
cd /
[takes dir up]
cd ..
[takes dir pre]
cd –
[pathname]
pwd
[copy]
cp
[move]
mv
[remove file]
rm
[remove empty dir]
rmdir
[remove dir]
rm -r
[make dir]
mkdir
[history]
history
[display filesystem]
df
[dir size]
du
[sys info]
uname -a
[brief cmd info]
whatis
[kernal ring buffer]
dmesg
sudo dmesg -w
sudo dmesg -e
[command purpose]
man xxxxxxxxxx
[audio setting]
alsamixer
[per check each file]
ls -l /path to directory
[file/folder details permission]
ls -lh
[file permission]
ls -l filename.ext
[permission for dir]
ls -ld /path to directory
[sdl version details-use any]
dpkg -l *libsdl*
sdl2-config --version
dpkg -l | grep sdl
[cpu information]
lscpu
[system architecture]
dpkg --print-architecture
[other architecture]
dpkg --print-foreign-architectures
[os details]
hostnamectl
lsb_release -a
[test clamav]
curl https://www.eicar.org/download/eicar.com.txt | clamscan -
[scan clamav]
sudo clamav --remove
===================================================================================
============================
chmod a-w file (removes all writing permissions)
chmod o+x file (sets execute permissions for other (public permissions))
chmod u=rx file (Give the owner rx permissions, not w)
chmod go-rwx file (Deny rwx permission for group, others)
chmod g+w file (Give write permission to the group)
chmod a+x file1 file2 (Give execute permission to everybody)
chmod g+rx,o+x file (OK to combine like this with a comma)
u = user that owns the file
g = group that owns the file
o = other (everyone else)
a = all (everybody)
r = read aces to the file
w = write access
x = execute (run) access
===================================================================================
============================
[raspberry pi]
%r will give you a 12 hour clock with am/pm indicator
%R will give you a 24 hour clock
%X will give you a 24 hour clock with seconds
%x will give you the date in this format DD/MM/YY
%d will give you the day in number format
%D will give you the date in this format MM/DD/YY
%a will give you the abbreviated day name
%A will give you the full day name
[Thu 12.May.2016 / 05:41 pm]
%a %d.%h.%Y / %I:%M %p
===================================================================================
============================
Rubiks
White Cross:
1) Start with Yellow center & White edges
2) Rotate 180 deg by matching sides
3) For White Corners: Li-Ti-L or R-T-Ri
Middle Layer:
1) Choose the Non-Yellow edge piece on top layer
2) Match the side and perform: Ti-Li-T-L-T-F-Ti-Fi or T-R-Ti-Ri-Ti-Fi-T-F
Top Layer:
Yellow Cross:
1) F-T-R-Ti-Ri-Fi (Dot, Reverse L, ---)
Yellow Face:
Conditions:
a) No Yellow corner Top pieces - Keep one Yellow side face on your Left
b) One Yellow corner Top piece - Keep that piece on your Left
c) Two Yellow corner Top piece - Keep one Yellow side face on your front Left
1) R-T-Ri-T-R-T180-Ri -Ti
Top Edges:
1) Ri-F-Ri-B180-R-Fi-Ri-B180-R180
2) L180-Ti-B-Fi-L180-Bi-F-Ti-L180
===================================================================================
============================