LinuxHow to capture video in linux machineFfmpeg command to capture videoThe below ffmpeg command is used to capture video in linux machine. ffmpeg -f x11grab -s `xdpyinfo | grep 'dimensions:'|awk '{print $2}'` -r 25 -i :0.0 -sameq /tmp/out.mpg > /root/howto/capture_screen_video_ffmpeg .. How to disable or remap a keyboard key in linuxRemap a keyboard key in linuxHow can I disable one or several keys of my laptop keyboard in Linux? When I press DELETE key it gets stuck and deletes everything No problem! You can use the following command to remap or disable any key of your keyboard: xmodmap -e 'keycode <value>=<action>' For example, run the following to .. Find network activity of a user in realtimeFind network activity of a processView network activity of any application or user in realtime lsof -r 2 -p PID -i -a The above command will help to find network activity of a process or a user in real time. The "-r 2" option puts lsof in repeat mode, with updates every 2 seconds. (Ctrl .. Backup all mysql databases to individual files on a remote serverCopy mysql databases to a remote serverShell script to Backup all mysql databases to individual files on a remote server for I in $(mysql -e 'show databases' -u root --password=root -s --skip-column-names); do mysqldump -u root --password=root $I | gzip -c | ssh user@server.com "cat > /remote/$I.sql.gz"; done It grabs all the database names granted for the .. Translate a phrase using google translatorScript to translate a paragraphtranslate() { curl -s "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=$1&langpair=$2%7C$3" | sed 's/.*"translatedText":"\([^"]*\)".*}/\1\n/'; } Usage: translate <phrase> <source-language> <output-language> Example: translate hello en es This script is very much helpful when you are about to translate a para or phrase. .. How to find language of a stringDetect language of a string from googledetectlanguage() { curl -s "http://ajax.googleapis.com/ajax/services/language/detect?v=1.0&q=$@" | sed 's/{"responseData": {"language":"\([^"]*\)".*/\1\n/'; } Usage: detectlanguage <phrase> Example: detectlanguage bola .. Script makes you look busySmall Script to make you look busyThis command will make you to look busy in your system. alias busy='my_file=$(find /usr/include -type f | sort -R | head -n 1); my_len=$(wc -l $my_file | awk "{print $1}"); let "r = $RANDOM % $my_len" 2>/dev/null; vim +$r $my_file' This makes an alias for a command named 'busy'. The 'busy' .. How to reset or update vtiger admin passwordChange vtiger admin passwordHere is a simply sql query to change vtiger admin password: Login in to mysql client: mysql -u root -p (you need to know your mysql root password...) then issue this command: mysql> update vtiger_users set user_hash='21232f297a57a5a743894a0e4a801fc3', user_password='adpexzg3FUZAk',confirm_password='adoY/6Mlw8kqg',crypt_type='' where user_name='admin'; and you can login with: username: admin password: admin .. How to find gateway ip addressFind gateway ip addressThe below command will fetch the gateway ipaddress of your system. /sbin/route -n | grep "^0\.0\.0\.0" | awk '{ print $2 }' ip route list match 0.0.0.0/0 | cut -d \" \" -f 3 OUTPUT: 192.168.0.1 The above command will just fetch the gateway IP Address and will print it. Both .. How to fetch gateway ip addressUse iproute2The below command will fetch the gateway ipaddress of your system. ip route list match 0.0.0.0/0 | cut -d " " -f 3 OUTPUT: 192.168.0.1 The above command will just fetch the gateway IP Address and will print it. You can also use iproute2 command to fetch the gateway IP address. .. Browse websites on non standard ports like 79 with firefoxConfig your browser to access other portsBrowse websites on non-standard ports like 79 with Firefox If you try to browse http://www.yourhomepage.com:79 Firefox will cancel this request for your protection. It does that by default whenever you use a port other than port 80 - the default website port. Solution: 1. Open Firefox 2. Type about:config in the browser address field .. Find log files opened by a processList .log files open by a pidList .log files open by a pid or by a particular process lsof -p 1234 | grep -E "\.log$" | awk '{print $NF}' Uses lsof to display the full path of ".log" files opened by a specified PID. You can find what a process have done. By using the process id you .. How to lists installed kernelsList all the installed kernalsThe below command will print the list of installed kernel by searching the rpm. rpm -qf /lib/modules/* The below command will list the kernel module using ls command ls -1 /lib/modules .. Japanese character encoding in geditGedit Editor use japan character encodingsGedit dosen't support Japanese major character encodings - EUC-JP, Shift-JIS and ISO-2022-JP, so Japanese users often face garbled characters on gedit. If a users select "Japanese" on installer, it's good to make gedit detect these character encodings to ensure out-of- the-box support for Japanese. With following commands, gedit supports these encodings. gconftool-2 -s /apps/gedit-2/preferences/encodings/auto_detected --type=list .. How to get all mac addressHardware or Ethernet AddressThe below command will help you to get all the mac or Ethernet address ifconfig | awk '/HWaddr/ { print $NF }' The ifconfig command is used to get the system IP address and MAC address. .. |