Using A File As A Storage Device

Originally posted on Flossstuff's Blog:

We all know that file stores our information in many types of formats. But do you know that  we can use it as a storage device too. Surprised???? Let’s go through the crazy process :D

We are going to create a empty file in Linux, format it and then mount it as if we are mounting a partition.  This process is long , So to understand it easily I am dividing it into 4 steps.

Step 1 : Create an empty file of desired size (200MB in this case) using the command

dd if=/dev/zero of=/filename bs=1M count=200

Explanation : dd command allows us to copy a file with specified number of bytes. Here if means input file, of means output file, bs is block size in bytes. You can use suffixes like K (for Kilobytes), M (for Megabytes), and G (for Gigabytes) . Note: If you are using Mac OS…

View original 519 more words

About these ads
Posted in Linux

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

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: