Cesar D. Rodas, web development. Technology news. PHP, MySQL, Apache, C, Bash, ASM

Unix! Everything is like a file…

Well, before we begin with this post I’d like to say that this blog will not focus in only in PHP but of course you can visit my PHP Blog. BTW, this blog always will be opened, but the target will be more than PHP.

Unix and Unix-like (BSD, GNU/Linux and others) have a and feature different to most operating system that is “every is a file”, this mean that you can access to the hardware as you access to a mere file. This may look like a insignificant feature for more people, but let me ask you one simple cuestion, how can you do advances feature with you operating system such as create an image file of a compac disk? Do you always need to use other software for do that?

Well, If you use a Unix like OS, let say GNU/Linux of FreeBSD (I use both), you can create an iso file with the following command

cp /dev/cdrom /path/iso/file.iso

/dev/cdrom is your cdrom device not where your cdrom is mounted

One not so common but sometimes really-neaded is copy or “clone” some harddisk, let say, you have a damage disk and you want to copy the entery disk, include the boot sections, can you do that with your OS without need other softwares? with a unix-like you can do that.

Copy from partition sd0 to hda0

cp /dev/sda0 /dev/hda0

Warnings: All the data in /dev/hda0 will be overwrited

Imagine that you can mount your “iso” files without need other software that your own OS, you do that too:
Mount the Minix CD-ISO file in the directory /cd/minix:

mount -t iso9660 -o loop /home/crodas/installers/os/minix3_1_3a_ide_r2964.iso /cd/minix

If you want to do more advances things such as burn a CD or DVD with some files (not with ISO) you should read this post

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages. Digg del.icio.us StumbleUpon Technorati BlinkList Furl NewsVine Reddit

Leave a Reply


Fatal error: Call to undefined function display_cryptographp() in /home/.schmuckie/saddor/cesarodas.com/wp-content/themes/first-spring-10/comments.php on line 94