One Day One Cmd

Place for playing with commands…

Day 60: $ !!

ODOC: !! To run the last command as we can !!, useful when you forget the command which as previously executed. It simply grabs the last run command. We can also do it for sudo commands by typing the !! followed by sudo.

For Ex: 
bala@bala-desktop:~$ !!
pwd
/home/bala
bala@bala-desktop:~$ sudo !!
sudo sudo fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xb9e8b9e8

 Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3060    24579418+   7  HPFS/NTFS
/dev/sda2            3061       19456   131700839+   f  W95 Ext'd 
/dev/sda5            3061        8159    40957686    7  HPFS/NTFS
/dev/sda6            8160       11346    25599546    7  HPFS/NTFS
/dev/sda7           13259       19456    49785403+   7  HPFS/NTFS
/dev/sda9           11596       13258    13356032   83  Linux
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: