Tag Info

New answers tagged

1

Extending on Iain's script with a faster version for working with a large number of files. #!/bin/bash ftypes=$(find . -type f | grep -E ".*\.[a-zA-Z0-9]*$" | sed -e 's/.*\(\.[a-zA-Z0-9]*\)$/\1/' | sort | uniq) for ft in $ftypes do echo -ne "$ft\t" find . -name "*${ft}" -exec du -bcsh '{}' + | tail -1 | sed 's/\stotal//' done


0

from du(1) (man page): -P, --no-dereference don't follow any symbolic links (this is the default) -x, --one-file-system skip directories on different file systems


2

du --max-depth=1 -x should do the trick. Option -x means not to follow other file-systems.


2

Some of the operations you mentioned (zapping caches, pruning unused data, etc.) are one-time operations, that might have some temporary effect, but I am not sure how useful they are on the normal operation basis. After all, the caches are there for a reason. Others, like GC, are ran by default by Artifactory (e.g. GC is running every 4 hours). All the ...


0

I solved using this two commands: FILES=$(find . -name '*.c') stat -c %s ${FILES[@]} | awk '{ sum += $1 } END { print ".c" " " sum }'


1

In my case this had to do with large deleted files. It was fairly painful to solve before I found this page, which set me on the correct path. I finally solved the problem by using lsof | grep deleted, which showed me which program was holding two very large log files (totalling 5GB of my available 8GB root partition).


4

You can't safely delete these files, they are there to facilitate uninstall, modify and repair operations for the installed product. These MSI files used to be small because they were stripped of their internal CAB files. However, starting with Windows 7 (MSI version 5) the MSI files are now cached full size to avoid breaking the file signature that affects ...


1

Daniel's right, you're using dynamic volumes and jbod of multiple partitions for s:. On any basic disk, you cannot use jbod, but you're able to shrink each partition if there's free space. I also do not recommend using 3rd party tools here because of the dynamic disk. This is a Microsoft-only thing, not really goot supported on linux. For future setups, ...


1

Provided that it is a VHDX file, try those commands: Resize-VHD –Path c:\Disk.vhdx –SizeBytes 80GB If that throws an error try: Resize-VHD –Path c:\Disk.vhdx –ToMinimumSize You cannot shrink a VHDX to less than its minimum size. To get the minimum size: (Get-VHD .\disk.vhdx).MinimumSize


2

When you shrink a partition, it shrinks from the right anyway. So there is no way to expand Volume C: without deleting the volume on its right side. Fastest way is to move all the files on volume S: onto an external usb drive, delete volume S: and then expand volume C: There is no other way without third-party tools (which I would not recommend)



Top 50 recent answers are included