Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Also, you can't move a regular file or directory to a device node.
(Plus, I'm not really sure that the system would let you move the root directory just like that.) -
@A-C-E actually the opposite should work. like cp /dev/null /dev/sda? not sure tho
-
@A-C-E @gitreflog
cat /dev/null > /dev/sda
That would probably work better, that is, as long as you actually have a disk in /dev/sda. -
@A-C-E Not necessarily always. The disk could have a different interface or even be named differently for whatever reason, so there can be cases where you don't have anything in /dev/sd*.
-
@bcye In a Linux system, a long time ago when there were SCSI disks and IDE disks, SCSI disks were named as /dev/sd* while IDE disks were named /dev/hd*.
When Serial ATA disks came out, they decided that, since the SCSI emulation drivers worked well for a wide range of disk interfaces, they might as well use the same interface for all hard disks, even for optical drives and such. So they started using the /dev/sd* naming for all hard disks. However, there are things like RAID controllers and the like that don't use the same generic driver, so the naming is usually different in those cases.
Just learned about /dev/null
Would mv / /dev/null work?
rant