Posts tagged "CLI"
Check Raid Status for Dell Raids on Linux
Linux support from dell is still very poor. They still support only RedHat$ and SuSE$. But there are ways to check the Raid status of Dell server on debian. http://hwraid.le-vert.net/ is doing a good job in collecting information and building Debian style packages. Example: A Dell server "PowerEdge T130" with "LSI L...
Autosave for VIM
I believe that it's a good idea that vi does not auto save during editing. Think of config files or src files that should never be in an inconsistent state. The programmer or sysadmin should decide when he wants to save data. But sometime auto save is handy, while typing lists like todo lists or outlines etc. Every ...
Wget Ignores its Timeout
Problem: wget has an option to configure the timeout for dns, connect, and read or a combined timeout option "-T". This option usually works, but it does not work during SSL handshake. You can test it with these commands: in one terminal start a dummy tcp service: nc -l 7777 and then try to connect to this service: ...
1:1 Copy of Hard Disks with Errors
Problem: When you get I/O errors on your computers hard disk, it's usually urgent to copy all data to a new disk. If you try to do a 1:1 copy using dd, you will see that dd stops when it reaches the first bad sector. Solution: use the following command to copy from one hard disk to second hard disk, with every bad s...
"dd" shows its progress
Problem: "dd" is a useful tool on linux . E.g. you can copy a disk image or wipe a disk, etc. But dd doesn't show you any progress indicator, and you don't know how long you have to wait until it has finished. Solution: send signal USR1 to the dd process and it will show you how much data it has already transferred ...
Howto generate an SSL key and self signed cert with openssl
For SSH, HTTPS, TLS SMTP,POPS, IMAPS you need a RSA key pair. Most Linux package installers produce this pairs automatically, but if you like, you can generate them yourself. The quickest method I found is: openssl req -x509 -nodes -newkey rsa:2048 -keyout servername.key -out servername.crt -days 1024 This command a...
Unix/Linux date command fails when calculating "yesterday"
Problem: A shell-script running every day short after midnight doesn't work properly once per year after daylight-saving time adjustment. e.g. an expected logfile is missing ("somefile.YYYYMMDD.log") Discussion: The Unix date command calculates the wrong date when used with "--date yesterday" on the day after daylig...
Mysql "Select" Output Turned Arround
When you have a mysql table with lot's of attributes, it's hard to read the output of a statement like this in mysql: select * from table limit 1; The data is folded very ugly. Easy Solution: select * from table limit 1 \G Mysql is showing one "Fieldname: Value" per line.