我有一台Linux CentOS服务器,使用的 OS+ 包大约5GB。然后,我将97GB 的数据从 Windows 服务器传输到这台 Linux 服务器上的两个文件夹,计算磁盘使用后,我看到两个文件夹的总大小大于磁盘使用大小。
du -sh
在每个文件夹上运行,一个使用50GB,另一个使用47GB
但是运行起来df -h
,使用的空间是96GB。( 50GB + 47GB + 5GB ) > 96GB
有什么问题吗?这两个文件夹包含大量文件(100 万+)。谢谢。
I have a folder contains one or more tar.gz files. I want to add current date before each files when the script run.
For example:
Two file name(those files will be created each day, but the name will remain the same):
file1.tar.gz
file2.tar.gz
Run Code Online (Sandbox Code Playgroud)
In first day(2011-10-07), those two files will be renamed to:
2011-10-07_file1.tar.gz
2011-10-07_file2.tar.gz
Run Code Online (Sandbox Code Playgroud)
In next day(2011-10-08), they are changed to:
2011-10-08_file1.tar.gz
2011-10-08_file2.tar.gz
Run Code Online (Sandbox Code Playgroud)
Finally, the folder contains the following files:
2011-10-07_file1.tar.gz
2011-10-07_file2.tar.gz
2011-10-08_file1.tar.gz
2011-10-08_file2.tar.gz
Run Code Online (Sandbox Code Playgroud)
How to achieve this using …