If you’ve done the SD card mod on WRT54GL, you might at some point change it with a bigger / faster card. You could just replace the SD card with a bigger one, but then you’d have to install/re-configure everything set up on it (like Optware stuff). […]
I recently needed to erase a specific range of sectors on a hard disk that had developed bad sectors. And I needed to erase them repeatedly, to make sure the remaining sectors in that area are stable.
This is were the dd tool comes in handy: dd if=/dev/zero of=/dev/sda seek=START count=SIZE bs=1M
One may want to see the disk space used by each item (be it subdirectory or file) in a directory in a Linux environment. There are several ways to do that:
for f in `ls`; do du -hs $f; done
This works in most cases but has the minus that it fails if any of the items have spaces in their names. A workaround…
At points one may need to quickly check and see who is connected to a server – and in case of servers running services such as http, ftp (so on) the number of their connections.
The netstat program does indeed display the list of connections, but browsing through it when there is a large number of connections is rather difficult.
The fastestmirror plugin may be useful at some points, but it can be a pain in the ass at others.
For example, I tried updating my CentOS installation today and because of the mirror caching it was downloading the updates at 30K/s. After disabling the plugin the speed from picking a different mirror jumped to 3MB/s.
To disable the plugin…
The dd command doesn’t include any kind of output on its operations. So if you’d like to run a lengthy dd operation and monitor its status, you’ll have to resort to a trick.
Running killall -USR1 dd will make dd to output it’s current status…
I decided to rearrange space a bit on the new CentOS server I am setting up…
This tutorial lists the steps I took to resize (grow) a functional RAID1 volume to a new size without losing data.
Sometimes a redirect from the root of the website to the subfolder is needed. The following .htaccess rules achieve just that…
Just like in real-life construction and rebuilding, you sometimes need to demolish and rebuild an existing website. And you probably want to do this behind a very nice and safe wall.
The wall, in our case, will be a “currently rebuilding. please visit soon” index.html file. If directory index priority is set to html then php, now the index.html file will be our visible website and hide the soon-to-be-demolished php-based website.
It’s great that Linux nowadays supports all the power management features available on computers. But it’s odd that beside the buttons to trigger standby/hibernate – which are only available in a graphical interface – there are no simple console commands to put the computer to sleep or into hibernation.
I recently attempted to install a fresh CentOS on a pair of recycled (previously used in a different linux sistem) hard disks.
Of course I got the classical message that the disks already had RAID metadata on them: “Disk contains BIOS metadata, but is not part of any recognized BIOS RAID sets. Ignoring disk sda”
You might have often encountered the “Argument list is too long” message when trying to rm -rf large amount of files. This happens often on large servers when trying to clean up the tmp folder. This is because the rm command has a pretty low count of supported parameters (filenames) while the tmp folder can become host to a terribly high number of files (millions in a period of years).