Skip to content

Instantly share code, notes, and snippets.

@chfle
Last active August 1, 2021 08:49
Show Gist options
  • Save chfle/b57c09b160e2e10ca293e818be95c991 to your computer and use it in GitHub Desktop.
Save chfle/b57c09b160e2e10ca293e818be95c991 to your computer and use it in GitHub Desktop.
useful commands for Mac / Linux
# Screenhot from the Command Line
# Mac
$ sleep 3; screencapture ~/Desktop/screenshot.jpg
# Linux
$ sleep 2; import -window root screen.png
# CDPATH
Modify your CDPATH to find your folders faster
--------- Sort all files with the last added at least ---------
find . -printf "%T@ %Tc%P\n" | sort -n
---------- Basic Hardware Information -----------
sudo lshw -numeric -html > lshw.html
---------- PCI DEVICES ----------
sudo lspci -knn > lspci.txt
---------- KERNEL MESSAGES ------------
sudo dmesg -wH
————— UBUNTU DESKTOP ON / OFF ————
sudo systemctl set-default multi-user.target
sudo systemctl set-default graphical.target
—————- STARTUP ANALYSE —————
sudo systemctl-analyze blame
—————— Linux Current Dir on HTTP Server ———-
python -m http.server 4444
------ List Wifi near by -------
nmcli -f all dev wifi list
------ Search Libre Files -------
unoconv -f txt --stdout Lebenslauf.odt | grep -n "Christian"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment