New answers tagged


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 ...


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.


The fastest way to create a file in a Linux system is fallocate: sudo fallocate -l 50G file From man: fallocate is used to manipulate the allocated disk space for a file, either to deallocate or preallocate it. For filesystems which support the fallocate system call, preallocation is done quickly by allocating ...


The problem was which have done cache clean every hour. Configuration it to store files on tmpfs fixed the problem.


There is also the findmnt command, which can print the number of bytes or a "human" number (powers of 1024 with non-iso abbreviations, sadly): $ findmnt -no size /mnt/xyz 9.7G $ findmnt -bno size /mnt/xyz 10434699264


You can do it without the grep: df --output=target,size /mnt/xyz | awk ' NR==2 { print $2 } ' df accepts as argument the mount point; you can tell to awk too to print both the second line only (NR==2) , and the 2nd argument, $2. Or better yet, cut the target as you are not outputting it, and it becomes: df --output=size /mnt/xyz | awk ' NR==2 ' When I ...


From the discussion in the bug linked in Daniel Bruno's answer .. you can get rid of these files using PackageKit console client pkcon $ sudo pkcon refresh force -c -1 It takes some time but is provided by PackageKit itself. (and you may set a cron job for it)


First of all, you need to remove the requirement to use a password to log into your servers. Use public key based logins instead. Once you've don that, you'll need something like: $ for host in "server1" "server2" ; do echo $host; ssh $host df --output="ipcent" /tmp | tail -n1 | tr -d " "; done | pr --columns=2 --length=2 | mail ...

0 makes the output of btrfs qgroup show more readable, replacing subvol IDs with the names of the subvols, e.g.: subvol group total unshared ------------------------------------------------------------------------------- test/a 0/970 20.05M 0.05M ...


You might do this: echo "$DF" | awk '$NF == "/var" || $NF == "/" { print $(NF-2) }' or if you want to use a regex, use the ~ regex matching operator: echo "$DF" | awk '$NF ~ "^(/var|/)$" { print $(NF-2) }' or: echo "$DF" | awk '$NF ~ "^/(var)?$" { print $(NF-2) }'

Top 50 recent answers are included