September 22, 2007

Some Useful Linux Commands

I can't declare myself as linux user since I didn't use linux as my main operating system on my computers. But I do use linux when needed. Since then, I always forget the commands when I didn't touch linux for years. Now I'm working on with linux again and I have to recall all the commands back again. So, to make my future search for useful commands more quickly, I compiled my linux commands here.

ls - list file or directory
Example Usage:

root@OpenWrt:/# ls
bin dev etc jffs lib mnt proc rom sbin tmp usr var www

cd - change directory
Example usage:
root@OpenWrt:~# cd /jffs

cat - view text in a file
Example usage:
root@OpenWrt:/etc# cat banner
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
WHITE RUSSIAN (0.9) -------------------------------
* 2 oz Vodka Mix the Vodka and Kahlua together
* 1 oz Kahlua over ice, then float the cream or
* 1/2oz cream milk on the top.

echo - echo a strings
root@OpenWrt:/# echo 'this is the first line
> and second line
> the third
> and then fourth' > mytextfile
root@OpenWrt:/# cat mytextfile
this is the first line
and second line
the third
and then fourth

insmod - install a kernel module
root@OpenWrt:/# insmod mmc
Using /lib/modules/2.4.30/mmc.o

lsmod - list of installed kernel module
root@OpenWrt:/# lsmod
Module Size Used by Tainted: P
mmc 26604 0 (unused)
wlcompat 15744 0 (unused)
ip_nat_irc 2336 0 (unused)
ip_conntrack_irc 3128 1
ip_nat_tftp 1824 0 (unused)
ip_conntrack_tftp 1728 1
ip_nat_ftp 2960 0 (unused)
ip_conntrack_ftp 4320 1
wl 423640 0 (unused)
switch-robo 4460 0 (unused)
switch-core 4912 0 [switch-robo]
diag 19808 0 (unused)

rmmod - uninstall a kernel module
root@OpenWrt:/# rmmod mmc

Umm... maybe enough for today coz I have things to do now. I'll update this post later...

Share This Article:

Bookmark This Article:
Feed Me Digg Technorati Best to Stumbleupon Reddit Blinklist Furl Spurl Yahoo Simpy