Feeds:
Posts
Comments

Archive for January, 2008

du – estimate file space usage
taufanlubis@toshiba:~$ du -h MyData/repo_gutsy/
4.0K MyData/repo_gutsy/partial
530M MyData/repo_gutsy/

taufanlubis@toshiba:~$

df – report file system disk space usage
taufanlubis@toshiba:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 88G 28G 56G 34% /
varrun 501M 100K 501M 1% /var/run
varlock 501M 0 501M 0% /var/lock
udev 501M 72K 501M 1% /dev
devshm 501M 0 501M 0% /dev/shm
lrm 501M 34M 468M 7% /lib/modules/2.6.22-14-generic/volatile
/dev/sda1 1.5G 139M 1.4G 10% /media/sda1
/dev/sda2 20G 12G 8.9G 56% /media/sda2

taufanlubis@toshiba:~$

file – determine file type
taufanlubis@toshiba:~$ file easycam1.png
easycam1.png: PNG image data, 519 x 318, 8-bit/color RGBA, non-interlaced
taufanlubis@toshiba:~$

diff – compare files line by line (find differences between files)
To test it, I created 2 files, test1 and test2.
taufanlubis@toshiba:~$ cat > test1
data test 1
1 2 3 4 5 6 7 8 9 0
a b c d e f g h i j

type ctrl-z
[6]+ Stopped cat > test1

taufanlubis@toshiba:~$ cat > test2
data test 2
1 2 3 4 5 6 7 8 9 0
a b c d e f g h i j
A B C D

type ctrl-z
[7]+ Stopped cat > test2

taufanlubis@toshiba:~$ diff test1 test2
1c1
< data test 1

> data test 2
3a4
> A B C D
taufanlubis@toshiba:~$
You see that there 2 lines which are different, line 1 (show the different) and line 4 (only file test2 has it).

 

exit – exit the console
taufanlubis@toshiba:~$ exit

 

echo – display a line of text
taufanlubis@toshiba:~$ echo ‘This is only a test’
This is only a test
taufanlubis@toshiba:~$ sudo echo “202.155.0.10” > /etc/resolv.conf
taufanlubis@toshiba:~$ sudo echo “202.155.1.15” >> /etc/resolv.conf

 

Read Full Post »

Below are the common commands that are used in Linux. Although many Linux Distros provide a good GUI (graphical user interface), there are a lot of linux-ers still exciting to use these Command Lines. Me, myself, I use it everyday. If you know how to use it, you can setup your system in seconds.

For example, when you to change your ip address (192.168.0.2) and ip gateway (192.168.0.1) from DHCP to static through GUI, at least you need at about 25 seconds. If you are get used to with Command Lines you can set it in less than 15 seconds. Because, what you need it is only open the Linux terminal and type:

$sudo ifconfig eth0 192.168.0.2 netmask 255.255.255.0
$sudo route add default gw 192.168.0.1

If you want to know what is ‘the function for a command line that you find’ and dig more information about it, you can use these commands.

For example, if you want to know what is ‘chage’, then just type.

taufanlubis@toshiba:~$ whatis chage

Then, when you want to go into details, just type:

taufanlubis@toshiba:~$ man chage (to quit type ‘:‘ then ‘q‘)

 

chage – change user password expiry information.

taufanlubis@toshiba:~$ man chage (check the manual)

taufanlubis@toshiba:~$ chage -l taufanlubis

Last password change : Nov 18, 2007
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7

taufanlubis@toshiba:~$

 

uname – to check kernel version (print system information)
taufanlubis@toshiba:~$ uname

Linux

taufanlubis@toshiba:~$ uname -r
2.6.22-14-generic

 

pwd – print name of current/working directory
taufanlubis@toshiba:~$ pwd
/home/taufanlubis

 

date – print or set the system date and time
taufanlubis@toshiba:~$ date
Sat Dec 29 06:34:36 WIT 2007

 

cal – display a calendar
taufanlubis@toshiba:~$ cal (display current month)
December 2007
Su Mo Tu We Th Fr Sa
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31

 

taufanlubis@toshiba:~$ cal -3 (display previous/current/next month output).

taufanlubis@toshiba:~$ cal -m 10 1970 (display October 1970 and Monday as the first day of the week).
October 1970
Mo Tu We Th Fr Sa Su
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

taufanlubis@toshiba:~$

 

w – Show who is logged on and what they are doing
taufanlubis@toshiba:~$ w
06:44:07 up 1:01, 2 users, load average: 0.21, 0.10, 0.09
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
taufanlu tty7 :0 05:43 0.00s 1:30m 0.14s x-session-manager
taufanlu pts/0 :0.0 06:25 0.00s 0.16s 0.00s w

taufanlubis@toshiba:~$

 

whoami – account information (print effective userid)
taufanlubis@toshiba:~$ whoami
taufanlubis

 


who – show who is logged on

taufanlubis@toshiba:~$ who
taufanlubis tty7 2007-12-29 05:43 (:0)
taufanlubis pts/0 2007-12-29 06:25 (:0.0)

taufanlubis@toshiba:~$

 


lspci – List all PCI devices

taufanlubis@toshiba:~$ lspci
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8039 PCI-E Fast Ethernet Controller (rev 14)
03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
07:06.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller
07:06.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller
07:06.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
07:06.3 Generic system peripheral [0805]: Texas Instruments PCIxx12 SDA Standard Compliant SD Host Controller

taufanlubis@toshiba:~$

 

The 3 codes on the left represent:

  • domain (0 to ffff)

  • bus (0 to ff)

  • slot (0 to 1f)

For example, if you want to see your USB controller (domain 00), (bus 1d) and slot (0,1,2,3,7), then you have to type:
taufanlubis@toshiba:~$ lspci -s 00:1d

00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)

taufanlubis@toshiba:~$

taufanlubis@toshiba:~$ lspci -s 00:1d.3
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)
taufanlubis@toshiba:~$

 

taufanlubis@toshiba:~$ lspci -d 8086:4222 (Show only devices with specified vendor and device ID)
03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
taufanlubis@toshiba:~$

 

Note:
Usage: lspci [<switches>]
-v Be verbose
-n Show numeric ID’s
-nn Show both textual and numeric ID’s (names & numbers)
-b Bus-centric view (PCI addresses and IRQ’s instead of those seen by the CPU)
-x Show hex-dump of the standard portion of config space
-xxx Show hex-dump of the whole config space (dangerous; root only)
-xxxx Show hex-dump of the 4096-byte extended config space (root only)
-s [[[[<domain>]:]<bus>]:][<slot>][.[<func>]] Show only devices in selected slots
-d [<vendor>]:[<device>] Show only selected devices
-t show bus tree
-m Produce machine-readable output
-i <file>Use specified ID database instead of /usr/share/misc/pci.ids.gz
-D Always show domain numbers
-M Enable `bus mapping’ mode (dangerous; root only)
-P <dir>Use specified directory instead of /proc/bus/pci
-H <mode>Use direct hardware access (<mode> = 1 or 2)
-F <file>Read configuration data from given file
-G Enable PCI access debugging

 

 

Read Full Post »

For details, just type ‘info gcompris‘ in your terminal.

Installation
taufanlubis@toshiba:~$ sudo apt-get install gcompris
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
gcompris-data python-pysqlite2
Suggested packages:
gnucap python-pysqlite2-dbg
Recommended packages:
gcompris-sound-en gcompris-sound
The following NEW packages will be installed:
gcompris gcompris-data python-pysqlite2
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 46.8MB of archives.
After unpacking 66.9MB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
gcompris-data python-pysqlite2 gcompris
Install these packages without verification [y/N]? y
Get:1 http://archive.ubuntu.com gutsy/main gcompris-data 8.3.2-1ubuntu2 [46.3MB]
Get:2 http://archive.ubuntu.com gutsy/main python-pysqlite2 2.3.4-2 [72.5kB]
Get:3 http://archive.ubuntu.com gutsy/main gcompris 8.3.2-1ubuntu2 [376kB]
Fetched 46.8MB in 6m41s (117kB/s)
Selecting previously deselected package gcompris-data.
(Reading database … 117050 files and directories currently installed.)
Unpacking gcompris-data (from …/gcompris-data_8.3.2-1ubuntu2_all.deb) …
Selecting previously deselected package python-pysqlite2.
Unpacking python-pysqlite2 (from …/python-pysqlite2_2.3.4-2_i386.deb) …
Selecting previously deselected package gcompris.
Unpacking gcompris (from …/gcompris_8.3.2-1ubuntu2_i386.deb) …
Setting up gcompris-data (8.3.2-1ubuntu2) …
Setting up python-pysqlite2 (2.3.4-2) …
Setting up gcompris (8.3.2-1ubuntu2) …

taufanlubis@toshiba:~$

gcompris.png

Read Full Post »

To reduce the loading process you can change the default setting of Open Office. To change the default setting, open any of your Open Office application. Go to Tools > Options > OpenOffice.org.

  • Number of steps : 10 (this is for your ‘undo‘ steps).

  • Use for OpenOffice.org : 128MB (increase it if you have more memories).

  • Enable systray Quickstarter : enabled

openoffice.png

 

Read Full Post »

Measure and display the rate of data across a network connection or data being stored in a file.

Installation

taufanlubis@toshiba:~$ sudo apt-get install speedometer

Reading package lists… Done

Building dependency tree

Reading state information… Done

The following extra packages will be installed:

python-urwid

The following NEW packages will be installed:

python-urwid speedometer

0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.

Need to get 179kB of archives.

After unpacking 889kB of additional disk space will be used.

Do you want to continue [Y/n]? y

WARNING: The following packages cannot be authenticated!

python-urwid speedometer

Install these packages without verification [y/N]? y

Get:1 http://archive.ubuntu.com gutsy/universe python-urwid 0.9.8.1-1 [165kB]

Get:2 http://archive.ubuntu.com gutsy/universe speedometer 2.4-1 [13.3kB]

Fetched 179kB in 20s (8750B/s)

Selecting previously deselected package python-urwid.

(Reading database … 123347 files and directories currently installed.)

Unpacking python-urwid (from …/python-urwid_0.9.8.1-1_i386.deb) …

Selecting previously deselected package speedometer.

Unpacking speedometer (from …/speedometer_2.4-1_all.deb) …

Setting up python-urwid (0.9.8.1-1) …

Setting up speedometer (2.4-1) …

taufanlubis@toshiba:~$

How to operate?

taufanlubis@toshiba:~$ sudo speedometer -rx ppp0

Note:

-rx network-interface display bytes received on network-interface

-tx network-interface display byte transmitted on network-interface

speedometer.png

Read Full Post »

pktstat listens to the network, shows and summary the bandwidth being consumed by packets of various kinds on an interface in real time. Each line displays the data rate associated with different classes of packets.

It understands some protocols (including FTP,HTTP, and X11) and adds a descriptive name next to the entry (e.g., ‘RETR cd8.iso’, ‘GET http://slashdot.org/’ or ‘xclock -fg blue’).

Installation

taufanlubis@toshiba:~$ sudo apt-get install pktstat

[sudo] password for taufanlubis:

Reading package lists… Done

Building dependency tree

Reading state information… Done

The following NEW packages will be installed:

pktstat

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

Need to get 30.1kB of archives.

After unpacking 102kB of additional disk space will be used.

WARNING: The following packages cannot be authenticated!

pktstat

Install these packages without verification [y/N]? y

Get:1 http://archive.ubuntu.com gutsy/universe pktstat 1.8.1-1 [30.1kB]

Fetched 30.1kB in 7s (4029B/s)

Selecting previously deselected package pktstat.

(Reading database … 123330 files and directories currently installed.)

Unpacking pktstat (from …/pktstat_1.8.1-1_i386.deb) …

Setting up pktstat (1.8.1-1) …

taufanlubis@toshiba:~$

How to operate?

taufanlubis@toshiba:~$ sudo pktstat -i ppp0 (I used point to point, for my connection).
pktstat.png

Read Full Post »

The CBM or Color Bandwidth Meter displays current traffic of all network device. This program is so simple that is should be self-explanatory.

Source code and newer versions are available from: http://www.isotton.com/utils/cbm/

Installation
taufanlubis@toshiba:~$ sudo apt-get install cbm

Reading package lists… Done

Building dependency tree

Reading state information… Done

The following NEW packages will be installed:

cbm

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

Need to get 21.3kB of archives.

After unpacking 90.1kB of additional disk space will be used.

WARNING: The following packages cannot be authenticated!

cbm

Install these packages without verification [y/N]? y

Get:1 http://archive.ubuntu.com gutsy/universe cbm 0.1-1 [21.3kB]

Fetched 21.3kB in 7s (2988B/s)

Selecting previously deselected package cbm.

(Reading database … 123325 files and directories currently installed.)

Unpacking cbm (from …/archives/cbm_0.1-1_i386.deb) …

Setting up cbm (0.1-1) …

taufanlubis@toshiba:~$

 

How to operate?
taufanlubis@toshiba:~$ sudo cbm

colorbandwithmeter.png

Read Full Post »

« Newer Posts - Older Posts »

Follow

Get every new post delivered to your Inbox.

Join 72 other followers