linux
How to Check Disk Space and Directory Space in Linux
Surprisingly, I often run into the problem of running out of disk space in Linux.
Here are some simple commands to check what consumes the most space:
- "df -k" shows the percentage of disk consumption for each partition
- "du --max-depth 1 -h /" shows how much space each directory under "/" consumes in megabytes
- "du -sm * | sort -n" does the same thing as the previous command
stackoverflow has a good discussion as well.
Get Rid of Duplicated Entries/Processes in htop Display
htop is a "top" on steroid Linux utility for interactively viewing processes.
What puzzled me was that some of the process counts seem to be doubled.
I know for a fact that I run two Thin servers(BTW, Thin seems to use less memory than Mongrel). But htop shows 4 processes
3895 root 20 0 187M 95484 3732 S 0.0 9.1 0:55.42 thin server (/tmp/site.1.sock) 3899 root 20 0 187M 95484 3732 S 0.0 9.1 0:03.26 thin server (/tmp/site.1.sock)
Chinese American Food != Food in China but == Linux
Reporter Jennifer 8. Lee talks about Chinese American food which is not really the kind of food you can get in China. She digs deep to find history of common Chinese American dishes like General Tso's chicken, and fortune cookies. She also discusses how 110 people won lottery with the same set of numbers. The most entertaining part is that she compares Chinese American food with Linux(yes. the open source operating system!)
Linux/Unix Console Tricks: Multiple Screens within One Console, Tailling Multiple Files with multitail
I find the following Linux/Unix console tricks really handy:
Multiple screens within one console
You need to SSH into a Linux server and work with multiple screens(eg: tailing a log, vi a source file, etc). Instead of opening multiple SSH sessions(multiple putty in Windows, or terminal windows in Mac), you can open multiple screens within one console window by using "screen" command.
yum install screen screen
Here are the shortcuts:
- ctrl+a + ctrl+c to add a new screens
- ctrl+a + ctrl+a to switch between screens
- ctrl+a + " to see a list of screens
- ctrl+a + (a number) to switch to the "numbered" screen
Tags: linux console utility screen trick logging shell command
Ubuntu 8 on VirtualBox Hosted on Windows
I recently got a Macbook Pro. But I can no longer use VMWare on Mac to run Linux because VMWare charges for its Fusion player on Mac. Fortunately, I can use VirtualBox which is free for all platforms.
Here are the steps to get Ubuntu 8(Guest) up and running in VirtualBox on Windows(Host):
- Download the ISO version of Ubuntu 8
- Open VirtualBox. Create a new image. I gave it a 16GB virtual disk.
- Attach the Ubuntu ISO image as cd-rom
- make sure the boot sequence starts with cd-rom
Tags: linux windows ubuntu vmware virtualbox
LinuxWorld 2005 - Keynotes
In the spirit of "Better later than never", I would blog my San Francisco LinuxWorld trip. It's my first-eve LinuxWorld trip.
Day 1:
I attended the keynote by Charles Phillips from Oracle.
Oracle chose Linux as its part of certified stack because Linux is open, and Oracle does not have its own OS. If Orcale apps have problems with Microsoft OS, it will have to get the support from MS. But with Linux, everything is open. Oracle can troubleshoot problems themselves and determine whehter it's a OS problem and application problem. If Oracle finds any bug, it'll fix it and contribute fixes back to Linux.
Tags: linux linuxworld patent











