ssh host alias (~/.ssh/config)
~/.ssh/config # always login as `marioosh` user Host * User marioosh # aliases for marioosh.net Host alias1 alias2 alias3 HostName marioosh.net Now You can login as below: $ ssh alias1 $ ssh alias2 $ ssh alias3
~/.ssh/config # always login as `marioosh` user Host * User marioosh # aliases for marioosh.net Host alias1 alias2 alias3 HostName marioosh.net Now You can login as below: $ ssh alias1 $ ssh alias2 $ ssh alias3
Substring $ a=teststring $ echo ${a:2:5} ststr Remove prefix (#) $ a=text_test.txt $ echo ${a#*_} test.txt Remove suffix (%) $ a=text_test.txt $ echo ${a%.txt} text_test
tail -f /var/log/apache2/error.log | grep –line-buffered mod_rewritetail -f /var/log/apache2/error.log | grep –line-buffered mod_rewrite with awk: tail -f /var/log/messages | grep –line-buffered auth | stdbuf -o0 awk -F" " ‘{print $2}’tail -f /var/log/messages | grep –line-buffered auth | stdbuf -o0 awk -F" " ‘{print $2}’
for_window [class="Eclipse" title="Preferences "] floating enable; for_window [class="Eclipse" title="Preferences "] resize set 980 680;for_window [class="Eclipse" title="Preferences "] floating enable; for_window [class="Eclipse" title="Preferences "] resize set 980 680;
$ vim ~/.config/sublime-text-3/Packages/User/Default.sublime-theme [ … { "class": "sidebar_label", "color": [0, 0, 0], "font.bold": false, "font.size": 15, "font.face": "Open Sans" }, { "class": "tab_label", "font.size": 15, "font.face": "Arial" } ]$ vim ~/.config/sublime-text-3/Packages/User/Default.sublime-theme [ … { "class": "sidebar_label", "color": [0, 0, 0], "font.bold": false, "font.size": 15, "font.face": "Open Sans" }, { "class": "tab_label", "font.size": 15, "font.face": Read more about Sublime Text 3: Linux sidebar and tabs fonts[…]
sendmail someone@somewhere.com < somefile
$ cp Font.ttf /usr/local/share/fonts $ fc-cache -v$ cp Font.ttf /usr/local/share/fonts $ fc-cache -v
cat /var/log/auth.log|grep fail|awk ‘{ print $14}’|sort|uniq –count|sort -nrcat /var/log/auth.log|grep fail|awk ‘{ print $14}’|sort|uniq –count|sort -nr
~/.gtkrc-2.0 gtk-font-name="Open Sans 10"~/.gtkrc-2.0 gtk-font-name="Open Sans 10" ~/.config/gtk-3.0/settings.ini [Settings] gtk-font-name = Open Sans 10~/.config/gtk-3.0/settings.ini [Settings] gtk-font-name = Open Sans 10 Soft for changing themes: gtk-chtheme, gtk-theme-switch
Resize all images in current directory to 600px height: for i in *; do mogrify -verbose -resize x600 “$i” ; done Resize all images (*.jpeg, *.jpg, *.JPG) in current directory and subdirectories to 800px height: find -type f -iregex ‘\(.*\.jpeg\)\|\(.*\.jpg\)\|\(.*\.JPG\)’|xargs mogrify -verbose -resize x800