.bash aliases

From EIK wiki
  1 # Preliminary version in Estonian can be found at http://viki.pingviin.org/Alias  
  2 #  
  3 # Also from http://enos.itcollege.ee/~edmund/materials/bash  
  4 #
  5 ###########################################################################
  6 # Some bash aliases
  7 ###################
  8 alias u='sudo apt update && sudo apt full-upgrade'
  9 alias k='sudo ldconfig && sudo dpkg --configure -a && sudo apt-get clean'
 10 alias i='sudo apt install'
 11 alias o='sudo apt search'
 12 alias n='sudo apt show'
 13 alias e='sudo apt purge'
 14 alias ae='sudo apt purge --auto-remove'
 15 alias p='sudo apt-cache policy'
 16 alias f='sudo apt install -f'
 17 ###########################################################################
 18 # Transfer
 19 # https://transfer.sh
 20 # usage: transfer file.txt - replace "file.txt" with real one
 21 # up to 10 GB, files stored for 14 days
 22 transfer() { if [ $# -eq 0 ]; then echo -e "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi 
 23 tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; }
 24 ###########################################################################
 25 alias clean='rm ~/.local/share/recently-used.xbel 2>/dev/null' #clean recently used files list
 26 alias neti='ping neti.ee -c3'
 27 #
 28 # What is my IP address?
 29 alias ipinfo='curl ipinfo.io'
 30 alias ipinfo-ip='curl ipinfo.io/ip'
 31 alias ipinfo-hostname='curl ipinfo.io/hostname'
 32 alias ipinfo-city='curl ipinfo.io/city'
 33 alias ipinfo-region='curl ipinfo.io/region'
 34 alias ipinfo-country='curl ipinfo.io/country'
 35 alias ipinfo-loc='curl ipinfo.io/loc'
 36 alias ipinfo-org='curl ipinfo.io/org'
 37 # sudo apt update && sudo apt install curl -y && sudo apt clean
 38 ###########################################################################
 39 # weather https://askubuntu.com/questions/390329/weather-from-terminal
 40 alias weather-tallinn='curl wttr.in/tallinn'
 41 alias weather2-tallinn='curl v2.wttr.in/tallinn'
 42 ###########################################################################
 43 # Logging with SSH keyfile example with checking key both in text and visual mode. Replace with appropriate data
 44 #
 45 #alias sshalias='ssh-keyscan -t ecdsa address.ee | ssh-keygen -lv -f - && ssh -X -i ~/.ssh/keyfile -o VisualHostKey=yes user@address.ee'
 46 #
 47 ###########################################################################
 48 # Power management
 49 alias power-lock-suspend='sudo physlock -du username; sudo systemctl suspend'
 50 # sudo apt update && sudo apt install physlock -y && sudo apt clean
 51 # https://groups.google.com/forum/#!topic/qubes-users/4dnNv5eYgq4
 52 # https://github.com/muennich/physlock
 53 alias power-off='systemctl poweroff'
 54 alias power-reboot='systemctl reboot'
 55 alias power-halt='systemctl halt'
 56 alias power-suspend='systemctl suspend'
 57 alias power-hibernate='systemctl hibernate'
 58 ###########################################################################
 59 # RADIO STATIONS
 60 # http://icecast.err.ee/
 61 # http://icecast.mmm.elion.ee:8080/
 62 # http://striiming.trio.ee/
 63 # www.raadio.ee
 64 # www.raadio.net
 65 # www.w3.ee
 66 # et.wikipedia.org/wiki/Eesti_raadiojaamade_loend
 67 # www.neti.ee/cgi-bin/teema/INFO_JA_MEEDIA/Raadio/
 68 # www.neti.ee/cgi-bin/teema/INFO_JA_MEEDIA/Raadio/ON-LINE/
 69 # www.rhm.ee/raadio/raadiojaam.html
 70 # www.google.com/Top/World/Eesti/Meedia/Raadio/
 71 # www.tvnewsradio.com/ee/raadio.htm
 72 # www.di.fm
 73 # somafm.com
 74 # www.surfmusic.de
 75 # www.micromusic.net
 76 # www.1club.fm/radioChannelGuide.htm
 77 # www.m2radio.fr
 78 #
 79 # Streaming Directories:
 80 # http://dir.xiph.org/ (http://www.icecast.org/)
 81 # http://www.shoutcast.com/
 82 # http://www.internet-radio.com/
 83 # http://www.live365.com/
 84 # http://www.listenlive.eu/
 85 # http://www.radiotunes.com/
 86 # http://radiotuna.com/
 87 # http://tunein.com/
 88 # http://www.977music.com/
 89 # http://www.radioguide.fm/
 90 # http://www.radio.de/
 91 #
 92 # MPlayer and codecs installation
 93 # https://help.ubuntu.com/community/MPlayer - install mediaplayer
 94 # https://help.ubuntu.com/community/RestrictedFormats - install codecs
 95 # sudo apt update && sudo apt install mplayer mplayer-fonts k|x|l|ubuntu-restricted-extras -y && sudo apt clean #choose one of the restricted extras package according used ubuntu flavour
 96 #
 97 ##########################################################################
 98 # Estonian National Broadcasting Company (ERR) - http://www.err.ee/
 99 # http://icecast.err.ee/
100 #
101 # Classic radio - http://klassikaraadio.err.ee/
102 alias radio-err-kl-128-mp3='mplayer -playlist http://icecast.err.ee/klassikaraadio.mp3.m3u'
103 alias radio-err-kl-128-ogg='mplayer -playlist http://icecast.err.ee/klassikaraadio.ogg.m3u'
104 alias radio-err-kl-64-mp3='mplayer -playlist http://icecast.err.ee/klassikaraadiomadal.mp3.m3u'
105 alias radio-err-kl-64-ogg='mplayer -playlist http://icecast.err.ee/klassikaraadiomadal.ogg.m3u'
106 # x-terminal-emulator -T "Klassikaraadio" -e "mplayer -playlist http://icecast.err.ee/klassikaraadio.ogg.m3u"
107 #
108 # Radio 2 - http://r2.err.ee/
109 alias radio-err-r2-128-mp3='mplayer -playlist http://icecast.err.ee/raadio2.mp3.m3u'
110 alias radio-err-r2-128-ogg='mplayer -playlist http://icecast.err.ee/raadio2.ogg.m3u'
111 alias radio-err-r2-64-mp3='mplayer -playlist http://icecast.err.ee/raadio2madal.mp3.m3u'
112 alias radio-err-r2-64-ogg='mplayer -playlist http://icecast.err.ee/raadio2madal.ogg.m3u'
113 # x-terminal-emulator -T "Raadio 2" -e "mplayer -playlist http://icecast.err.ee/raadio2.mp3.m3u"
114 #
115 # Radio 4 - http://r4.err.ee/
116 alias radio-err-r4-128-mp3='mplayer -playlist http://icecast.err.ee/raadio4.mp3.m3u'
117 alias radio-err-r4-128-ogg='mplayer -playlist http://icecast.err.ee/raadio4.ogg.m3u'
118 alias radio-err-r4-64-mp3='mplayer -playlist http://icecast.err.ee/raadio4madal.mp3.m3u'
119 alias radio-err-r4-64-ogg='mplayer -playlist http://icecast.err.ee/raadio4madal.ogg.m3u'
120 #
121 # Radio Tallinn - http://raadiotallinn.err.ee/
122 alias radio-err-rt-128-mp3='mplayer -playlist http://icecast.err.ee/raadiotallinn.mp3.m3u'
123 alias radio-err-rt-128-ogg='mplayer -playlist http://icecast.err.ee/raadiotallinn.ogg.m3u'
124 alias radio-err-rt-64-mp3='mplayer -playlist http://icecast.err.ee/raadiotallinnmadal.mp3.m3u'
125 alias radio-err-rt-64-ogg='mplayer -playlist http://icecast.err.ee/raadiotallinnmadal.ogg.m3u'
126 #
127 # Vikerradio - http://vikerraadio.err.ee/
128 alias radio-err-vr-128-mp3='mplayer -playlist http://icecast.err.ee/vikerraadio.mp3.m3u'
129 alias radio-err-vr-128-ogg='mplayer -playlist http://icecast.err.ee/vikerraadio.ogg.m3u'
130 alias radio-err-vr-64-mp3='mplayer -playlist http://icecast.err.ee/vikerraadiomadal.mp3.m3u'
131 alias radio-err-vr-64-ogg='mplayer -playlist http://icecast.err.ee/vikerraadiomadal.ogg.m3u'
132 # x-terminal-emulator -T "Vikerraadio" -e "mplayer -playlist http://icecast.err.ee/vikerraadio.ogg.m3u"
133 #
134 ##########################################################################
135 # Trio LSL - http://www.trio.ee/ ja ka http://striiming.trio.ee/
136 #
137 # http://www.myhits.ee
138 alias radio-trio-circle-k-256='mplayer -playlist http://striiming.trio.ee/circle-k.ogg.m3u'
139 alias radio-trio-circle-k-320='mplayer -playlist http://striiming.trio.ee/circle-k.mp3.m3u'
140 #
141 # http://www.dfm.ee
142 alias radio-trio-dfm64='mplayer -playlist http://striiming.trio.ee/dfm64.mp3.m3u'
143 alias radio-trio-dfm128='mplayer -playlist http://striiming.trio.ee/dfm.mp3.m3u'
144 #
145 # http://www.elmar.ee
146 alias radio-trio-elmar64='mplayer -playlist http://striiming.trio.ee/elmar_low.mp3.m3u'
147 # x-terminal-emulator -T "Elmar" -e "mplayer -playlist http://striiming.trio.ee/elmar64.mp3.m3u"
148 alias radio-trio-elmar128-mp3='mplayer -playlist http://striiming.trio.ee/elmar.mp3.m3u'
149 alias radio-trio-elmar128-ogg='mplayer -playlist http://striiming.trio.ee/elmar.ogg.m3u'
150 alias radio-trio-elmar256-mp3='mplayer -playlist http://striiming.trio.ee/elmar_high.mp3.m3u'
151 #
152 # http://www.kuku.ee
153 alias radio-trio-kuku64='mplayer -playlist http://striiming.trio.ee/kuku64.mp3.m3u'
154 alias radio-trio-kuku-low='mplayer -playlist http://striiming.trio.ee/kuku_low.mp3.m3u'
155 # x-terminal-emulator -T "Kuku" -e "mplayer -playlist http://striiming.trio.ee/kuku64.mp3.m3u"
156 alias radio-trio-kuku128-mp3='mplayer -playlist http://striiming.trio.ee/kuku.mp3.m3u'
157 alias radio-trio-kuku128-ogg='mplayer -playlist http://striiming.trio.ee/kuku.ogg.m3u'
158 alias radio-trio-kuku256-mp3='mplayer -playlist http://striiming.trio.ee/kuku_high.mp3.m3u'
159 #
160 # http://www.myhits.ee
161 alias radio-trio-myhits-256='mplayer -playlist http://striiming.trio.ee/myhits.mp3.m3u'
162 alias radio-trio-myhits-256='mplayer -playlist http://striiming.trio.ee/myhits.ogg.m3u'
163 alias radio-trio-myhits-320='mplayer -playlist http://striiming.trio.ee/myhits_high.mp3.m3u'
164 alias radio-trio-myhits-low='mplayer -playlist http://striiming.trio.ee/myhits_low.mp3.m3u'
165 #
166 # http://www.narodnoeradio.ee
167 alias radio-trio-narodnoe='mplayer -playlist http://striiming.trio.ee/narodnoe.mp3.m3u' 
168 ###########################################################################
169 #
170 # Babahh Media
171 # http://skymedia.babahhcdn.com/
172 # http://skyplus.babahhcdn.com/
173 #
174 # http://retro.babahhcdn.com/
175 # http://phr.babahhcdn.com/
176 #
177 # http://www.retrofm.ee/
178 alias radio-babahh-retrofm-320='mplayer http://retro.babahhcdn.com/RETRO'
179 #http://retro.babahhcdn.com/retro1.mp3.m3u
180 #http://retro.babahhcdn.com/retro2.mp3.m3u
181 #
182 alias radio-babahh-nrj-320='mplayer -playlist http://retro.babahhcdn.com/NRJ.m3u'
183 alias radio-babahh-nrj-dnb-128='mplayer -playlist http://retro.babahhcdn.com/NRJdnb.m3u'
184 alias radio-babahh-nrj-house-128='mplayer -playlist http://retro.babahhcdn.com/NRJhouse.m3u'
185 alias radio-babahh-rr-stream-tx-256='mplayer -playlist http://retro.babahhcdn.com/RR.m3u'
186 alias radio-babahh-sky='mplayer -playlist http://retro.babahhcdn.com/SKY.m3u'
187 #
188 #http://www.skyplus.fm/
189 alias radio-babahh-skyplus-128='mplayer -playlist http://skyplus.babahhcdn.com/SKYPLUS.m3u'
190 alias radio-babahh-skydance-128='mplayer -playlist http://skyplus.babahhcdn.com/SKYdance.m3u'
191 alias radio-babahh-skygold-128='mplayer -playlist http://skyplus.babahhcdn.com/SKYgold.m3u'
192 alias radio-babahh-skyplus-dance-128='mplayer -playlist http://skyplus.babahhcdn.com/skyplus_dance.mp3.m3u'
193 alias radio-babahh-skyplus-eesti-128='mplayer -playlist http://skyplus.babahhcdn.com/skyplus_eesti.mp3.m3u'
194 alias radio-babahh-skyplus-gold-128='mplayer -playlist http://skyplus.babahhcdn.com/skyplus_gold.mp3.m3u'
195 alias radio-babahh-skyplus-top40-128='mplayer -playlist http://skyplus.babahhcdn.com/skyplus_top40.mp3.m3u'
196 #
197 # Star FM - http://starfm.tv3.ee/
198 alias radio-starfm='mplayer -playlist http://phr.babahhcdn.com/starfm'
199 alias radio-starfm80='mplayer -playlist http://phr.babahhcdn.com/star80'
200 alias radio-starfm90='mplayer -playlist http://phr.babahhcdn.com/star90'
201 #alias babahh-starfm1='mplayer -playlist http://phr.babahhcdn.com/starfm.m3u'
202 #lias babahh-starfm2='mplayer -playlist http://phr.babahhcdn.com/starfm-app.m3u'
203 #alias babahh-starfm3='mplayer -playlist http://phr.babahhcdn.com/starxmas.m3u'
204 #
205 ###########################################################################
206 # PowerHit Radio - http://power.tv3.ee/
207 alias radio-babahh-powerhit='mplayer http://phr.babahhcdn.com:9000/phr'
208 alias radio-babahh-powerhit-partyzone='mplayer  http://mtg-radio.babahhcdn.com/ppztest'
209 alias radio-babahh-powerhit-street='mplayer  http://wr22-icecast.mtg-r.net/wr22_mp3'
210 alias radio-babahh-powerhit-powerclub='mplayer  http://wr21-icecast.mtg-r.net/wr21_mp3'
211 ###########################################################################
212 # Christian radios in Estonia
213 alias radio-raadio7='mplayer http://icecast.mmm.elion.ee:8080/Raadio7' # http://www.raadio7.ee/
214 #
215 # Tartu Pereraadio http://www.pereraadio.ee/
216 alias radio-pereraadio-tartu='mplayer -playlist http://bee.pereraadio.ee:8000/listen.pls' # 128 kbps
217 # x-terminal-emulator -T "Tartu Pereraadio" -e "mplayer -playlist http://bee.pereraadio.ee:8000/listen.pls"
218 #
219 alias radio-pereraadio-kuressaare='mplayer -playlist http://mmm.elion.ee/kurpre.asx' # Kuressaare Pereraadio http://www.pereraadio.com/
220 ###########################################################################
221 # Ruut FM - http://www.ruutfm.ee/
222 alias radio-ruutfm='mplayer -playlist http://web.mmm.elion.ee/ruutfm.asx'
223 ###########################################################################
224 # Marta FM - http://www.martafm.ee/
225 alias radio-martafm='mplayer http://icecast.mmm.elion.ee:8080/MartaFM'
226 ###########################################################################
227 # Raadio TRE - http://www.treraadio.ee/
228 alias radio-tre='mplayer -playlist http://sc1.treraadio.ee:8002/listen.pls'
229 alias radio-tre-parnu='mplayer http://icecast.mmm.elion.ee:8080/paikeseraadio'
230 alias radio-tre-paide='mplayer -playlist http://kuma.fm/fileadmin/user_upload/rait/skin/kesk-eestiTRE.m3u'
231 ###########################################################################
232 # Raadio Mania - http://www.mania.ee/
233 alias radio-mania='mplayer -playlist http://icecast.linxtelecom.com:8000/mania.mp3.m3u'
234 # x-terminal-emulator -T "Raadio Mania" -e "mplayer -playlist http://icecast.linxtelecom.com:8000/mania.mp3.m3u"
235 ###########################################################################
236 # Radio Kadi - http://www.kadi.ee/ (levitaja: http://www.eqcomputer.com)
237 alias radio-kadi='mplayer http://icecast.mmm.elion.ee:8080/Kadi'
238 # x-terminal-emulator -T "Raadio Kadi" -e "mplayer http://213.35.156.115/kadi"
239 ###########################################################################
240 # Cafe Radio - http://kohviradio.com/
241 alias radio-kohviraadio='mplayer -playlist http://kohviradio.com:8080/kohviradio.m3u'
242 ###########################################################################
243 # Pärnu Radio - http://www.pfm.ee/
244 alias radio-parnu='mplayer http://raadio.pfm.ee:8000/pfm.ogg'
245 # x-terminal-emulator -T "Pärnu Raadio" -e "mplayer http://raadio.pfm.ee:8000/pfm.ogg"
246 ###########################################################################
247 # Nõmme Radio - http://www.nommeraadio.ee/
248 alias radio-nommeraadio='mplayer http://149.210.138.12:8000/nommeraadio'
249 ###########################################################################
250 # Radios outside Estonia
251 alias radio-t4e_main='mplayer http://out03.t4e.dj:80/main_high.mp3'
252 alias radio-t4e_hard='mplayer http://out03.t4e.dj:80/hard_high.mp3'
253 alias radio-t4e_club='mplayer http://out03.t4e.dj:80/club_high.mp3'
254 alias radio-t4e_lounge='mplayer http://out03.t4e.dj:80/lounge_high.mp3'
255 alias radio-iwayhigh_dub_electro_chill='mplayer -playlist http://iwayhigh.net:8000/listen.pls'
256 alias radio-iwayhigh_guidance2='mplayer -playlist http://iwayhigh.net:8002/listen.pls'
257 ###########################################################################
258 # Metal
259 alias radio-metalradio='mplayer -playlist http://cent4.serverhostingcenter.com:2199/tunein/dzapped-stream.pls' #http://metalradio.com/
260 ###########################################################################
261 # ambient
262 alias radio-ambient-somafm-dronezone='mplayer -playlist http://somafm.com/dronezone.pls' #ambient http://somafm.com/dronezone/
263 alias radio-ambient-somafm-spacestation='mplayer -playlist http://somafm.com/spacestation.pls' # http://somafm.com/spacestation/
264 alias radio-ambient-somafm-deepspace='mplayer -playlist http://somafm.com/wma128/deepspaceone.asx' # http://somafm.com/deepspaceone/
265 alias radio-ambient-somafm-groovesalad='mplayer -playlist http://somafm.com/wma128/groovesalad.asx' # http://somafm.com/groovesalad/
266 alias radio-ambient-somafm-missioncontrol='mplayer -playlist http://somafm.com/wma128/missioncontrol.asx' # http://somafm.com/missioncontrol/
267 alias radio-ambient-hbr1='mplayer -playlist http://radio.hbr1.com:19800/ambient.ogg.m3u' # http://www.hbr1.com/ Dream Factory
268 alias radio-ambient-sleepbot='mplayer -playlist http://www.sleepbot.com/ambience/cgi/listen.cgi/listen.pls' # http://www.sleepbot.com/ambience/broadcast/
269 alias radio-ambient-bluemars='mplayer -playlist http://streams.echoesofbluemars.org:8000/bluemars.m3u' # http://echoesofbluemars.org/
270 alias radio-ambient-cryosleep='mplayer -playlist http://streams.echoesofbluemars.org:8000/cryosleep.m3u' # http://echoesofbluemars.org/cryosleep.php
271 alias radio-ambient-voices-from-within='mplayer -playlist http://streams.echoesofbluemars.org:8000/voicesfromwithin.m3u' # http://echoesofbluemars.org/voicesfromwithin.php
272 ###########################################################################
273 # Christian outside Estonia
274 alias radio-christian-metal-hardrock-low='mplayer -playlist http://christianhardrock.net/CHRDN/live/low.pls'
275 alias radio-christian-metal-hardrock-high='mplayer -playlist http://christianhardrock.net/CHRDN/live/high.pls'
276 alias radio-christian-metal-rock-low='mplayer -playlist http://www.christianrock.net/CRDN/live/low.pls'
277 alias radio-christian-metal-rock-high='mplayer -playlist http://www.christianrock.net/CRDN/live/high.pls'
278 alias radio-christian-metal-classicrock-low='mplayer -playlist http://www.christianclassicrock.net/CCRDN/live/low.pls'
279 alias radio-christian-metal-classicrock-high='mplayer -playlist http://www.christianclassicrock.net/CCRDN/live/high.pls'
280 alias radio-christian-metal-sanctus-gladius='mplayer -playlist http://yp.shoutcast.com/sbin/tunein-station.m3u?id=1624924'
281 alias radio-christian-metal-full-armor='mplayer -playlist http://yp.shoutcast.com/sbin/tunein-station.m3u?id=329149'
282 alias radio-christian-powerpraise-low='mplayer -playlist http://www.christianpowerpraise.net/CPPDN/live/low.pls'
283 alias radio-christian-powerpraise-high='mplayer -playlist http://www.christianpowerpraise.net/CPPDN/live/high.pls'
284 alias radio-christian-rock-I-am='mplayer -playlist http://yp.shoutcast.com/sbin/tunein-station.m3u?id=28991'
285 #alias christian-blastfm='mplayer -playlist http://yp.shoutcast.com/sbin/tunein-station.m3u?id=107652'
286 alias radio-christian-musicforhisglory='mplayer -playlist http://yp.shoutcast.com/sbin/tunein-station.m3u?id=99190554'
287 alias radio-christian-life-radio='mplayer -playlist http://yp.shoutcast.com/sbin/tunein-station.m3u?id=155707'
288 ###########################################################################
289 # exotic
290 alias radio-swastik-bhajan-bhakti='mplayer -playlist http://yp.shoutcast.com/sbin/tunein-station.m3u?id=69157'
291 alias radio-kripalu-bhakti-radio='mplayer -playlist http://yp.shoutcast.com/sbin/tunein-station.m3u?id=114038'
292 ###########################################################################
293 # Estonian National Broadcasting Company (http://www.err.ee/) TC channels:
294 # ETV - http://etv.err.ee/
295 # ETV2 - http://www.err.ee/etv2/
296 #
297 # In the web: http://otse.err.ee/:
298 # ETV  - http://otse.err.ee/etv/
299 # ETV2 - http://otse.err.ee/etv2
300 # mpv installation https://mpv.io/installation/
301 alias tv-etv='sh -c "while true; do mpv --network-timeout=2 http://sb.err.ee/live/etv.m3u8; done"'
302 alias tv-etv2='sh -c "while true; do mpv --network-timeout=2 http://sb.err.ee/live/etv2.m3u8; done"'
303 alias tv-etv+='sh -c "while true; do mpv --network-timeout=2 http://sb.err.ee/live/etvpluss.m3u8; done"'
304 alias tv-sulge='sh -c "killall -9 sh mpv"'
305 #
306 # Web cam test
307 #
308 alias wc1='mplayer tv:// -tv driver=v4l2:device=/dev/video0'
309 alias wc2='mplayer tv:// -tv driver=v4l2:device=/dev/video1'
310 alias wc3='mplayer tv:// -tv driver=v4l2:device=/dev/video2'
311 alias vlcwc1='vlc v4l2:///dev/video0'
312 alias vlcwc2='vlc v4l2:///dev/video1'
313 alias vlcwc3='vlc v4l2:///dev/video2'