我在一台机器上有一个源目录,其中有一堆文件,都具有相同的权限,我想复制到另一个目录,通过SMB挂载.
[tmark@dexter JR09141045 roche_454_transfer]$ls -l /source_dir total 71348 -rwxrwxrwx 1 adminrig lifelabs 19768377 Mar 25 23:29 1.TCA.454Reads.fna -rwxrwxrwx 1 adminrig lifelabs 53093396 Mar 25 23:29 1.TCA.454Reads.qual -rwxrwxrwx 1 adminrig lifelabs 1035 Mar 25 23:29 454AllControlMetrics.csv -rwxrwxrwx 1 adminrig lifelabs 2657 Mar 25 23:29 454AllControlMetrics.txt -rwxrwxrwx 1 adminrig lifelabs 4607 Mar 25 23:29 454BaseCallerMetrics.csv -rwxrwxrwx 1 adminrig lifelabs 14518 Mar 25 23:29 454BaseCallerMetrics.txt -rwxrwxrwx 1 adminrig lifelabs 351 Mar 25 23:23 454DataProcessingDir.xml -rwxrwxrwx 1 adminrig lifelabs 702 Mar 25 23:29 454QualityFilterMetrics.csv -rwxrwxrwx 1 adminrig lifelabs 1609 Mar 25 23:29 454QualityFilterMetrics.txt -rwxrwxrwx 1 adminrig lifelabs 13496 Mar 25 23:29 454RuntimeMetricsAll.csv -rwxrwxrwx 1 adminrig lifelabs 26967 Mar 25 23:29 454RuntimeMetricsAll.txt -rwxrwxrwx 1 adminrig lifelabs 1675 Mar 25 14:48 dataRunParams.xml -rwxrwxrwx 1 adminrig lifelabs 7134 Mar 25 23:29 gsRunProcessor.log
目标目录是通过SMB安装的,我试图一次性复制这组文件.
[tmark@dexter JR09141045 target_dir]$cd /target_dir [tmark@dexter JR09141045 target_dir]$cp -p /source_dir/* ./ cp: preserving times for `./454AllControlMetrics.csv': Operation not permitted cp: preserving times for `./454AllControlMetrics.txt': Operation not permitted cp: preserving times for `./454BaseCallerMetrics.csv': Operation not permitted cp: preserving times for `./454BaseCallerMetrics.txt': Operation not permitted cp: preserving times for `./454DataProcessingDir.xml': Operation not permitted cp: preserving times for `./454QualityFilterMetrics.csv': Operation not permitted cp: preserving times for `./454QualityFilterMetrics.txt': Operation not permitted cp: preserving times for `./454RuntimeMetricsAll.csv': Operation not permitted cp: preserving times for `./454RuntimeMetricsAll.txt': Operation not permitted cp: preserving times for `./dataRunParams.xml': Operation not permitted cp: preserving times for `./gsRunProcessor.log': Operation not permitted [tmark@dexter JR09141045 target_dir]$ls -l total 71264 -rwxrwxrwx 1 tmark 1008 19768377 Mar 25 23:29 1.TCA.454Reads.fna -rwxrwxrwx 1 tmark 1008 53093396 Mar 25 23:29 1.TCA.454Reads.qual -rwxr-xr-x 1 tmark 1008 1035 Apr 1 2015 454AllControlMetrics.csv -rwxr-xr-x 1 tmark 1008 2657 Apr 1 2015 454AllControlMetrics.txt -rwxr-xr-x 1 tmark 1008 4607 Apr 1 2015 454BaseCallerMetrics.csv -rwxr-xr-x 1 tmark 1008 14518 Apr 1 2015 454BaseCallerMetrics.txt -rwxr-xr-x 1 tmark 1008 351 Apr 1 2015 454DataProcessingDir.xml -rwxr-xr-x 1 tmark 1008 702 Apr 1 2015 454QualityFilterMetrics.csv -rwxr-xr-x 1 tmark 1008 1609 Apr 1 2015 454QualityFilterMetrics.txt -rwxr-xr-x 1 tmark 1008 13496 Apr 1 2015 454RuntimeMetricsAll.csv -rwxr-xr-x 1 tmark 1008 26967 Apr 1 2015 454RuntimeMetricsAll.txt -rwxr-xr-x 1 tmark 1008 1675 Apr 1 2015 dataRunParams.xml -rwxr-xr-x 1 tmark 1008 7134 Apr 1 2015 gsRunProcessor.log
请注意,前两个文件的时间和权限与源目录中的时间和权限相同,但其余文件的时间和权限不同.
因此,似乎我可以复制一些文件并保留其权限和时间,但不能保存其他文件,即使所有源文件来自同一个地方并具有相同的权限和(或多或少)次数,而且我m同时将它们全部复制到同一目录 – 因此使用相同的umask等.
那么,为什么我可以保留一些但不是所有文件的时间?
我很乐意提供更多细节(umask,Linux版本,smb.conf等),除了我无法理解这些细节如何解释我所看到的 – 因为它们应该在这里不变.