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