
Tips: Linux/Unix world
Articles: Fix for Broken Yum on CentOS 5.x with Python Error Message
Articles: Android X86 Black Screen Fix (Wake Up from Sleep), + Tips & Wishlist
Articles: Solution to MySQL Subtraction of Integers Problem Resulting in Negative Number
Articles: A Solution for mysqldump: Got errno 32 on write
Articles: Block/Prevent Domain Name That Is Not Yours from DNS Resolving to Your IP/Server in Apache
Articles: Apache Configuration for Domain Redirection for Unforeseen Sub-domains
Articles: Get the Current Hour/Minute and Time Comparison Logic for BASH Script in Linux
Articles: PHPBB Flood Error Fix and RC.LOCAL the Linux Version of the Startup Folder/Autoexec.bat
Articles: Fix for Vim Weird "Â" Character Appearing When You Type/Paste ASCII Character
Articles: Fix Black Diamond with Question Mark in HTML After Switching Servers
Articles: Vim and Vi Delete All Lines Below Cursor/Current Line
If you use the venerable Vim or Vi editor- here's a tip for you- if you want to delete all the lines beneath the current line, simply do a:dG
It's not ":dG" which won't work. The "dG" will delete all the lines below the current line, no matter how many lines are left. Certainly beats having to keep doing "dd".
Articles: BASH IF ELSE Example Plus Nested IF Example
Articles: Backup your files using tar and gzip
The following command backs up the foobar directory into a file called foobar.tgz:
tar cvf - /home/foobar | gzip > /home/backup/foobar.tgz
With the newer versions of the GNU tar the above can be shortened to:
tar cvfz /home/foobar /home/backup/foobar.tgzHere is a video that demos how you would goes into more detail, as well as setting up the back-up task using cron.
Articles: Delete all messages in Pine
Here is the combination of keys to mark all messages for delete in Pine, the popular console-based email client for Linux and other *nix operating systems:
;aad
Even though pine is no longer being developed, Alpine and Re-Pine are a pair of projects that built upon the venerable command-line based Linux email reader.
Here is a video on how to setup Gmail with Alpine:Articles: Changing the date in Linux
date MMDDHHmmYYYY
e.g.
[root@scooter logs]# date 111017482002
Sun Nov 10 17:48:00 PST 2002
Then you should run "hwclock", which synchronizes the hardware clock with the OS clock- just type the following:
hwclock --set --date="`date '+%m/%d/%y %H:%M:%S'`"
Articles: How to use wget with a proxy server
export http_proxy=http://IP_ADDRESS_OF_PROXY_SERVER:PORT e.g.
export http_proxy=http://192.168.0.200:3128/
Articles: Renaming multiple files without the rename utility
for f in *.html; do mv $f `basename $f .html`.php; done
Articles: Listing Only Directories In Linux - more ways
ls -al | grep '^d' | cut -d=":" -f2 | cut -d=" " -f2
ls -1ap | grep / | cut -d"/" -f1
-Vishwanath
Articles: Listing Only Directories In Linux
1. This can be done using "awk" as follows
ls -al | grep '^d' | awk ' { print $9 } '
2. Second method can be achieved using "cut" command
ls -al | grep '^d' | cut --delimiter=":" -f2 | cut --delimiter=" " -f2