Python – Using the Bing Search API
Introduction
Bing is a great search engine with very generous API volumes for ... Read more
1 2 3 4 5 6 |
find . -name "*.flv.mp4" | while read file; do echo "$file"; mv "$file" "${file%.flv.mp4}.mp4" #mv "$file" "$(expr "$file" : '\(.*\)\.flv.mp4').mp4" done; |
1 |
cat ~/.bash_aliases |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
alias pj='ps -fA|grep java' # pdf viewer alias v='qpdfview' # open browser alias b='x-www-browser' # check space left in drives alias space='df -h' # open password gorilla alias pw='password-gorilla' # Show hidden files alias l.='ls -d .* --color=auto' # cd .. aliases alias ..='cd ..' alias ...='cd ../..' alias ....='cd ../../..' alias .....='cd ../../../..' alias ......='cd ../../../../..' alias .......='cd ../../../../../..' alias ........='cd ../../../../../../..' alias .........='cd ../../../../../../../..' alias ..........='cd ../../../../../../../../..' alias .2='cd ../..' alias .3='cd ../../..' alias .4='cd ../../../..' alias .5='cd ../../../../..' alias .6='cd ../../../../../..' alias .7='cd ../../../../../../..' alias .8='cd ../../../../../../../..' alias .9='cd ../../../../../../../../..' alias .10='cd ../../../../../../../../../..' alias .11='cd ../../../../../../../../../../..' # history grab alias hig='history|grep ' alias sz="du -ch $@| egrep '[0-9]+[\.KMGT]\stotal'|awk '{print \$1;}'" # Grabs the disk usage in the current directory #alias usage='du -ch | grep total' #Gets the total disk usage on your machine alias totalusage='df -hl --total | grep total' # Shows the individual partition usages without the temporary memory values alias partusage='df -hlT --exclude-type=tmpfs --exclude-type=devtmpfs' # Gives you what is using the most space. Both directories and files. Varies on # current directory alias most='du -hsx * | sort -rh | head -10' # shadowbq December 17, 2012 at 2:08 pm # # usage is better written as alias usage='du -ch 2> /dev/null |tail -1' alias mkdir='mkdir -pv' # Create a new set of commands alias path='echo -e ${PATH//:/\\n}' # current date now alias now='date +"%T' alias nowtime=now alias nowdate='date +"%d-%m-%Y"' # Show open ports #Use netstat command to quickly list all TCP/UDP port on the server: alias du1='du -h -d 1' alias ports='netstat -tulanp' # find files using locate - sudo apt-get install locate alias lo='locate -i -b --regex' # ls aliases alias lf='ls -alF --color=auto' alias la='ls -al --color=auto' alias ll='ls -l --color=auto' alias l='ls -l --color=auto' alias lh='ls -lh --color=auto' alias cls='clear' # ls look into directories above alias l1='ls -l ..' alias l2='ls -l ../..' alias l3='ls -l ../../..' alias l4='ls -l ../../../..' alias l='ls -alF --color=auto ' alias ls='ls --color=auto' alias dir='ls -l --color=auto' # go to home directory alias h='cd ~' alias home='cd ~' # beep - why or why do you want to make noise ? just fun :) alias beep='echo -en "\007"' # delete directories alias rd='rm -rf' # create directory alias md='mkdir -p' alias o='less' alias t='tail -f ' # hash alias rehash='hash -r' #alias unmount='echo "Error: Try the command: umount" 1>&2; false' #alias which='type -p' #alias you='su - -c "/sbin/yast2 online_update"' # some more ls aliases # sudo apt-get install -y iotop alias io='sudo iotop -Pao' alias upd='sudo apt-get update -y' alias af='sudo apt-get -f' alias ar='sudo apt-get -y autoremove' # apt-get install shortcut alias i='sudo apt-get install -y' # apt-get remove shortcut alias u='sudo apt-get remove -y' # check if a particular process is running alias p='ps -ef|egrep -v "grep --color=auto"|egrep --color' # kill a process alias k='sudo killall -I -r ' #alias kk='sudo kill -KILL ' #alias pk='sudo pkill -i -f ' #alias rm="mv -t ~/.Trash" #alias rm="mv -bt ~/.local/share/Trash/files/" #alias rm='mkdir -p ~/.Trash;mv -t ~/.Trash' #alias rm='mkdir -p ~/.Trash;mv -n -b -t ~/.Trash' # use trash command for all deletes - avoids false deletes # sudo apt-get install -y python-setuptools trash-cli alias rm='trash-put' # check blocked network port alias bp='sudo netstat -lnptu|grep ' |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# Install the gnome-fallback-session and Xfce sudo apt-get install gnome-session-fallback xfce4 -y # Check if the new sessions have been actually installed ls -ail /usr/share/xsessions total 48 drwxr-xr-x 2 root root 4096 2012-04-15 11:55 ./ drwxr-xr-x 307 root root 12288 2012-04-15 11:55 ../ -rw-r--r-- 1 root root 233 2011-12-04 22:15 gnome-classic.desktop -rw-r--r-- 1 root root 205 2011-12-04 22:15 gnome.desktop -rw-r--r-- 1 root root 277 2011-12-04 22:15 gnome-fallback.desktop -rw-r--r-- 1 root root 188 2011-12-04 22:15 gnome-shell.desktop -rw-r--r-- 1 root root 208 2011-12-04 22:15 ubuntu-2d.desktop -rw-r--r-- 1 root root 185 2011-12-04 22:15 ubuntu.desktop -rw-r--r-- 1 root root 5808 2011-09-23 13:21 xfce.desktop # select Xfce as default GUI sudo /usr/lib/lightdm/lightdm-set-defaults -s xfce # logout /usr/bin/gnome-session-quit --no-prompt |