Hot answers tagged

18

The fastest way to create a file in a Linux system is fallocate: sudo fallocate -l 50G file As per the question @gerrit question, fallocate needs root privileges because it does not actually "creates" the file per se, but manipulates directly the file allocation system to believe the file was created; thus being almost instant as the question asks, as it ...


11

/dev does not hold any partitions. /dev is a de facto standrad place to keep all device nodes. Originally, /dev was a plain directory in the root file system (so the device nodes created survived a system reboot). Nowadays, the special virtual filesystem backed by RAM is used by most Linux distributions. There is no standard of any kind to have some ...


7

Other alternatives include: to change the alarm thresholds to something near or below the current usage, or to create a very small test partition with limited inodes, size, or other attributes. Being able to test things such as running into the root reserved percentage, if any, may also be handy.


3

A file or directory in the filesystem need not actually correspond to anything on disk. For instance, you can have a filesystem (and its files) or part of it exist entirely in memory. But they don't have to be files at all, at least in the sense we usually use the term. Think of the filesystem and its "files" as an abstract interface. Almost all of your ...


2

The only thing resembling a partition in /dev/ is udev which is a pseudo filesystem used for dynamic device allocation which is a kernel feature to make device files flexible and easy to use. What you see in /dev/ are device files which actually refer to real devices, including hard drives (/dev/sda) and their partitions (/dev/sda1). Partitions are mounted ...


1

fallocate -l 50G big_file truncate -s 50G big_file dd of=bigfile bs=1 seek=50G count=0 As those three ways can all fill up a partition quickly. If you like use dd, usually you can try it with seek. Just set seek=file_size_what_you_need and set count=0. That will tell the system there is a file, and its size is what you set, but the system will not create ...


1

/boot and /var aren't necessarily on their own partition, but you can do so, on installing a *nix OS... Personnaly my /home has its own partition The data these folders really contain is located on parts of the actual hard drive, and as I guess the /dev/sda* files are just info about the actual disk partition (like its beginnig and end on the disk, its ...


1

Yes you can. Easily. All the modern file managers are able to scan other hard drives for any readable partitions (e.g. ntfs, fat, ext etc) . It is possible to safely copy data from the hard disk. In case it is not getting automatically mounted, you can first get the UUID or device details by doing a sudo blkid and then using umount to mount the filesystem.


1

It may be too late already, but the first thing you should do when you notice hard drive failure, or data loss is to make an image of the failed hard drive using ddrescue. Playing around with fsck or parted has the potential to make things worse. That being said, if the data you've lost is mission-critical, you may want to call in a professional to help you ...


1

You sound confused. /boot is a directory. It is possible to put the contents of /boot on a different partition, but /boot itself is a normal directory. It doesn't really make sense to say "/boot is a partition". It is customary to have a directory named /dev, which contains "device nodes" such as sda, sda1, and so on. These look like files, but if you open ...


1

My low-tech storage benchmark: For writes: dd if=/dev/urandom of=some.file bs=1M count=whatever For reads: dd if=some.file of=/dev/null For things like shared folders, usage profile can be important, writing 1024x1MB files or one single 1GB file can yield very different results.


1

Looking at the partition table for /dev/loop0 and the disk image sizes reported for /dev/loop0 and /dev/loop1, I'm inclined to suggest that the two disks were simply bolted together and then the partition table was built for the resulting virtual disk: Disk /dev/loop0: 298.1 GiB, 320072933376 bytes, 625142448 sectors Device Boot Start End ...


1

Most Unix systems didn't implement asynchronous reads of local disks; attempting the call results in synchronous reads. In particular, in Linux the sleep for local disks is uninterruptible (which is annoying on scratched CDs). If local disk IO happens to be interruptible on your platform you can use alarm(); read(); to set the maximum time you are willing ...



Only top voted, non community-wiki answers of a minimum length are eligible