Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 LINUX/UNIX


  Mount DD image on Linux

Yesterday, my Raspberry Pi running Arch Linux was not able to boot with error: Kernel Panic, not syncing: no init found. I spent a night on it, but could not find a working solution. The last option is easy: reinstall the system. That is really the last resort, for I do not want to re-setup everything I have done: samba server, Time Machine server, Xunlei Offline Downloader…Unable to mount the SD cardThe system does not boot, so I need to find a way to get into the file system to identify what is wrong, or at least backup all the configuration files.I cannot directly mount it on my Mac,...

9,443 2       LINUX DD IMAGE


  Shortest command on Linux

Usually when we log in to a Linux system,. we may type some frequently used Linux commands such as pwd,ls, ps etc. All these commands are really simple but powerful with different options. But do you know what is the shortest command on Linux? The answer is w.According to Linux manual, w will show who is logged on and what they are doing on the system. w displays information about the users currently on the machine, and their processes. The header shows, in this order, the current time, how long the system has been running, how many users are currently logged on, and the system load averages ...

9,338 0       W LINUX SHORTEST COMMAND


  Guide for installing Ubuntu in VirtualBox on Windows

Have you ever tried to have two OSs installed on your PC? Do you want to try out the new Ubuntu system? If you do want to use Ubuntu when at the same time you are using Windows, you may want to install your Ubuntu in an VirtualBox. In this post, we will show you how to install Ubuntu in VirtualBox on Windows.Pre-requisitesVirtualBox -- You can download it from Oracle.Ubuntu -- You can download it from here. Please note it should be an ISO fileThe Ubuntu used in this post is Ubuntu 12.04 LTS.InstallationStep 1. Install the VirtualBox, it is like any other application installation on WindowsStep...

15,851 0       WINDOWS VIRTUALBOX UBUNTU


  A possible way to recover deleted files on Linux

Last week I was generating a MD5 sum for an virtual machine image on one OpenNebula server:# ls -l test.img-rw-r--r-- 1 root root 10486808576 Oct 12 02:21 test.img# md5sum test.imgAt the same time I was clearing the files on the server on another terminal and deleted the above image file mistakenly with :# rm test.imgSince this image file is 10GB, it took some time to remove this file from the server, so I used the Ctrl+Z command to suspend the remove command.[1]+ Stopped md5sum test.imgBy doing this, we can recover the deleted image file later. The rationale here is if other ...

55,282 0       LINUX FILE RECOVERY


  37 powerful Linux shell commands

To work on Linux platform, you cannot avoid using shell commands to complete some tasks. These tasks can be as simple as list files in some directories or find some text in some file, or can be as complex as monitoring processes. In this post, we will share 37 powerful Linux shell commands. TaskCommands1Delete file with 0 byte(empty file)find . -type f -size 0 -exec rm -rf {} \;find . type f -size 0 -delete2Check process memory consumptionps -e -o "%C : %p : %z : %a"|sort -k5 -nr3Check process CPU utilizetionps -e -o "%C : %p : %z : %a"|sort -nr4Print URLs in cachegrep -r -a jpg /data/cac...

40,089 0       LIST LINUX COMMAND


  Time-saving tips Linux users should know

As a programmer or system administrator, we have more chances of working on *nix platforms. It's tough experience when first start use *nix as we need to face a black screen without knowing what's behind it. Now, if we can have some resources to rely on, then we will find the beautify of *nix. They are fast, efficient and most importantly sexy. Below are some great tips for helping Linux users get used to Linux.This list is a bit long. So be patient. To get more information on a command mentioned, first try "man ". The best way to learn something is to read the specification first then practic...

16,091 3       TIPS LINUX


  Server monitoring shell scripts

There are many open source server monitoring software such as cacti and nagios. Besides these, can we write our own shell scripts to monitor them? The shell scripts written by ourselves can fulfill our special requirements better and have a more detailed coverage.Below are some commonly used shell scripts used by Evangelist, an Oracle DBA. 1. Check network gateway traffic#!/bin/bash#network#Mike.Xuwhile : ; do time='date +%m"-"%d" "%k":"%M' day='date +%m"-"%d' rx_before='ifconfig eth0|sed -n "8"p|awk '{print $2}'|cut -c7-' tx_before='ifconfig eth0|sed -n "8"p|awk '{print $6...

46,011 2       MEMORY SHELL CPU SERVER MONITOR


  Recover deleted file in Linux EXT3 file system

Environment : CentOS 5.3 x86_64, /dev/sdb1 is the data segment /data0. EXT3 file system.Problem : /data0/tcsql/cankao/phpcws-1.5.0/httpcws.cpp is deleted mistakenly and httpcws.cpp is not backed up. It will take much time to rewrite this program again. So we must recover it back.debugfs is feasible in EXT2 file system, but in EXT3 file system, it's not very useful. There is one open source software called ext3grep which can help us recover deleted file in EXT3 file system. The recovery steps are:1. Install ext3grep.wget http://ext3grep.googlecode.com/files/ext3grep-0.10.1.tar.gztar zxvf ext3gr...

7,854 0       LINUX EXT3 FILE RECOVERY