Difference between revisions of "Linux CLI commands I Cannot Remember..."
Jump to navigation
Jump to search
Line 22: | Line 22: | ||
* parse RadioReference.com 1FC data from website and save CCs to list <br> | * parse RadioReference.com 1FC data from website and save CCs to list <br> | ||
− | <nowiki> wget -O 1fc.html http://www.radioreference.com/apps/db/?sid=7118 && cat 1fc.html | sed 's/[a-zA-Z<>="\/: #-]/ /g' | grep "[7,8][5,6,7][0-9].[0-9][0-9][0-9][0-9][0-9]c" | awk '{ print $6 }' > 1fc.cc </nowiki> | + | <nowiki><code> wget -O 1fc.html http://www.radioreference.com/apps/db/?sid=7118 && cat 1fc.html | sed 's/[a-zA-Z<>="\/: #-]/ /g' | grep "[7,8][5,6,7][0-9].[0-9][0-9][0-9][0-9][0-9]c" | awk '{ print $6 }' > 1fc.cc </code></nowiki> |
* parse the 1fc.html data for ALL freqs in use <br> | * parse the 1fc.html data for ALL freqs in use <br> | ||
− | <nowiki>cat 1fc.html | grep "[7,8][0-9][0-9].[0-9][0-9][0-9][0-9][0-9]" | sed 's/[a-zA-Z<>="\/: #-]//g' > 1fc.all</nowiki><br> | + | <nowiki><code>cat 1fc.html | grep "[7,8][0-9][0-9].[0-9][0-9][0-9][0-9][0-9]" | sed 's/[a-zA-Z<>="\/: #-]//g' > 1fc.all<code></nowiki><br> |
− | * read the "p" text in a news webpage <nowiki>cat index.html | grep '<p>' | sed 's/<[^<>]*>//g' | sed 's/[^>]*>//g' | sed 's/<[^<]*//g' | sed 's/MORE//g' | festival --tts</nowiki><br> | + | * read the "p" text in a news webpage <nowiki><code>cat index.html | grep '<p>' | sed 's/<[^<>]*>//g' | sed 's/[^>]*>//g' | sed 's/<[^<]*//g' | sed 's/MORE//g' | festival --tts</code></nowiki><br> |
* working outbound mail CLI <code>cat /var/log/apache2/error.log | mail -s "Apache Error Logs" kf4nvx@gmail.com</code><br> | * working outbound mail CLI <code>cat /var/log/apache2/error.log | mail -s "Apache Error Logs" kf4nvx@gmail.com</code><br> | ||
Line 37: | Line 37: | ||
* modify file timestamp <code>touch -t YYYYMMDDHHMM filename.ext</code><br> | * modify file timestamp <code>touch -t YYYYMMDDHHMM filename.ext</code><br> | ||
− | * rename images by their EXIF timestamp <nowiki>exiv2 -r'%Y%m%d_%H%M%S' -F *.JPG</nowiki><br> | + | * rename images by their EXIF timestamp <nowiki><code>exiv2 -r'%Y%m%d_%H%M%S' -F *.JPG</code></nowiki><br> |
* EAS decoder <code>multimon-ng -a EAS -t wav $FILE</code><br> | * EAS decoder <code>multimon-ng -a EAS -t wav $FILE</code><br> | ||
* rtl-fm play audio localy broadcast FM <code>rtl_fm -g 50 -f 99.9M -M wfm -s 180k -E deemp | play -r 180k -t raw -e s -b 16 -c 1 -V1 - lowpass 16k</code><br> | * rtl-fm play audio localy broadcast FM <code>rtl_fm -g 50 -f 99.9M -M wfm -s 180k -E deemp | play -r 180k -t raw -e s -b 16 -c 1 -V1 - lowpass 16k</code><br> |
Revision as of 05:09, 1 May 2020
Random CLI Commands
htop - graphical process monitor
iptraf - graphical IP traffic monitor
meshmap - HSMM mesh map generator
figlet - make ASCII letters
chirpw - radio programming
camgrab - CLI webcam pic grabber
pwgen - password generator
links2 - ncurses web browser
inxi -Fx - System information
weather - cli weather info
CLI Commands with some useful syntax
- list the fingerprint of key
ssh-keygen -lf ~/.ssh/id_rsa.pub
- parse fail2ban logs
cat /var/log/fail2ban.log | grep Ban | awk '{print $6,$7,$1,$2}' | uniq
sudo cat fail2ban.log | grep Ban | awk '{print $8}' | sort | uniq -c
sudo cat /var/log/fail2ban.log | grep Ban | awk '{print $8,$7}' | sort | uniq -c
- useless waste of time and peta-flops
cat /dev/urandom | hd | grep "ca fe"
- parse RadioReference.com 1FC data from website and save CCs to list
<code> wget -O 1fc.html http://www.radioreference.com/apps/db/?sid=7118 && cat 1fc.html | sed 's/[a-zA-Z<>="\/: #-]/ /g' | grep "[7,8][5,6,7][0-9].[0-9][0-9][0-9][0-9][0-9]c" | awk '{ print $6 }' > 1fc.cc </code>
- parse the 1fc.html data for ALL freqs in use
<code>cat 1fc.html | grep "[7,8][0-9][0-9].[0-9][0-9][0-9][0-9][0-9]" | sed 's/[a-zA-Z<>="\/: #-]//g' > 1fc.all<code>
- read the "p" text in a news webpage <code>cat index.html | grep '<p>' | sed 's/<[^<>]*>//g' | sed 's/[^>]*>//g' | sed 's/<[^<]*//g' | sed 's/MORE//g' | festival --tts</code>
- working outbound mail CLI
cat /var/log/apache2/error.log | mail -s "Apache Error Logs" kf4nvx@gmail.com
- open udp ports for chromecast
iptables -I INPUT -p udp -m udp --dport 32768:61000 -j ACCEPT
- working RTL-SDR ADS-B webserver
$PATH/dump1090 --raw --net --net-http-port 8008 & mono $PATH/VirtualRadar.exe
- modify file timestamp
touch -t YYYYMMDDHHMM filename.ext
- rename images by their EXIF timestamp <code>exiv2 -r'%Y%m%d_%H%M%S' -F *.JPG</code>
- EAS decoder
multimon-ng -a EAS -t wav $FILE
- rtl-fm play audio localy broadcast FM
rtl_fm -g 50 -f 99.9M -M wfm -s 180k -E deemp | play -r 180k -t raw -e s -b 16 -c 1 -V1 - lowpass 16k