|
Create multiple empty files with one shell command |
|
|
|
|
Monday, 17 October 2011 |
Let's say we want to create 7 file with name file1.txt to file7.txt. There's a simple shell command to do that using touch:
touch file{1,2,3,4,5,6,7}.txt
This works on bash or UNIX shell (sh). |
|
|
See block device attributes including partition IDs |
|
|
|
|
Saturday, 23 July 2011 |
To see hard drive partition UUIDs we will use:
blkid
We will get something like this:
blkid /dev/sda1: UUID= "e7d5dc1c-39c0-45da-a46d-e76e4732be0a" TYPE= "ext2" /dev/sda5: UUID= "6gweev-x2vo-B3YT-4IK6-fdtf-fuky-wL494i" TYPE= "LVM2_member" /dev/sdb1: LABEL= "boot" UUID= "b32815c6-e738-4908-bf0a-faccf1143ba3" TYPE= "ext2" /dev/mapper/ubuntu-root: UUID= "88941476-0505-484a-b443-dab2dd1527f4" TYPE= "ext4" /dev/mapper/ubuntu-swap_1: UUID= "91607340-1d3d-4af5-9883-9706abe88b39" TYPE= "swap" |
|
|
Dump partition table in Linux |
|
|
|
|
Saturday, 23 July 2011 |
Well it will dump the informations regarding partition tables (size and starting point) in a usefull format for re-creation of partition table.
For that we will use sfdisk:
sfdisk -d /dev/sdb >partitions.txt
To restore the partition table we will use:
sfdisk /dev/sdb <partitions.txt
Boot code will not be restored. |
|
Last Updated ( Saturday, 23 July 2011 )
|
|
|
List all hard drives in Linux |
|
|
|
|
Saturday, 23 July 2011 |
If you want to find out (list) all your hard drives installed on your system in Linux run:
fdisk -l |
|
|
Upgrade your Ubuntu Server to a newer version |
|
|
|
|
Saturday, 23 July 2011 |
|
In order to upgrade your Ubuntu Server distribution run from command line: sudo -s do-release-upgrade |
|
|