Stat 的三个时间
时间: 2023-11-22 09:15:07 浏览: 40
在 Unix/Linux 系统中,每个文件都有三个时间戳,分别是:
1. 访问时间(atime/access time):表示最近一次访问该文件的时间。
2. 修改时间(mtime/modify time):表示最近一次修改该文件内容的时间。
3. 变化时间(ctime/change time):表示最近一次修改该文件元数据(例如文件权限、所有者等)的时间。
这三个时间戳可以通过 `stat` 命令来查看。使用 `stat` 命令时,可以使用 `-c` 参数来指定输出格式,例如:
```
stat -c "%n %x %y %z" file.txt
```
其中,`%n` 表示文件名,`%x` 表示访问时间,`%y` 表示修改时间,`%z` 表示变化时间。
需要注意的是,不同的文件系统对这三个时间戳的更新策略可能不同。例如,某些文件系统可能只在文件内容发生变化时才会更新修改时间,而不会在文件属性发生变化时更新变化时间。此外,有些文件系统也可能会使用更精确的时间戳来记录文件的访问、修改和变化时间。
相关问题
channelsftp stat lstat区别
Channelsftp stat lstat是SFTP协议中的三个指令,用于获取远程文件或目录的信息。其中,stat指令可以获取文件或目录的一些基本信息,如文件大小、创建时间等;lstat指令可以获取符号链接本身的信息,而不是指向的目标文件的信息;而ls指令可以列出指定目录下的文件列表。这三个指令的区别在于获取信息的粒度不同,使用时需根据需要选择。
java实现dtw时间序列算法
Java实现DTW时间序列算法可以使用第三方库,例如tslearn和jmotif。以下是使用tslearn库实现DTW算法的步骤:
1. 安装tslearn库:可以使用pip install tslearn命令进行安装。
2. 导入tslearn库:在Java代码中导入tslearn库。
3. 加载时间序列数据:将需要比较的时间序列数据加载到Java程序中。
4. 计算DTW距离:使用tslearn库中的dtw方法计算两个时间序列之间的DTW距离。
5. 输出结果:将计算结果输出到控制台或者文件中。
以下是一个简单的Java程序示例,演示如何使用tslearn库实现DTW算法:
```
import java.util.ArrayList;
import java.util.List;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.stream.Stream;
import org.apache.commons.math3.ml.distance.DistanceMeasure;
import org.apache.commons.math3.ml.distance.EuclideanDistance;
import org.apache.commons.math3.stat.descriptive.moment.StandardDeviation;
import org.apache.commons.math3.stat.descriptive.moment.Mean;
import org.apache.commons.math3.stat.descriptive.rank.Percentile;
import org.apache.commons.math3.stat.descriptive.rank.Median;
import org.apache.commons.math3.stat.descriptive.SummaryStatistics;
import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
import org.apache.commons.math3.stat.descriptive.rank.Max;
import org.apache.commons.math3.stat.descriptive.rank.Min;
import org.apache.commons.math3.stat.descriptive.rank.Sum;
import org.apache.commons.math3.stat.descriptive.rank.Product;
import org.apache.commons.math3.stat.descriptive.rank.Variance;
import org.apache.commons.math3.stat.descriptive.rank.Skewness;
import org.apache.commons.math3.stat.descriptive.rank.Kurtosis;
import org.apache.commons.math3.stat.descriptive.moment.GeometricMean;
import org.apache.commons.math3.stat.descriptive.moment.HarmonicMean;
import org.apache.commons.math3.stat.descriptive.moment.SecondMoment;
import org.apache.commons.math3.stat.descriptive.moment.ThirdMoment;
import org.apache.commons.math3.stat.descriptive.moment.FourthMoment;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovariance;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMean;import org.apache.commons.math3.stat.descriptive.moment.VectorialProduct;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSummaryStatistics;
import org.apache.commons.math3.stat.descriptive.moment.VectorialVariance;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSkewness;
import org.apache.commons.math3.stat.descriptive.moment.VectorialKurtosis;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovarianceMatrix;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMeanVector;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCentralMoment;
import org.apache.commons.math3.stat.descriptive.moment.VectorialFourthMoment;
import org.apache.commons.math3.stat.descriptive.moment.VectorialThirdMoment;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSecondMoment;
import org.apache.commons.math3.stat.descriptive.moment.VectorialProductValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMeanValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovarianceValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialVarianceValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSkewnessValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialKurtosisValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovarianceMatrixValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMeanVectorValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCentralMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialFourthMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialThirdMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSecondMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialProductValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMeanValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovarianceValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialVarianceValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSkewnessValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialKurtosisValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovarianceMatrixValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMeanVectorValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCentralMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialFourthMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialThirdMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSecondMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialProductValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMeanValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovarianceValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialVarianceValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSkewnessValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialKurtosisValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovarianceMatrixValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMeanVectorValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCentralMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialFourthMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialThirdMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSecondMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialProductValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMeanValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovarianceValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialVarianceValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSkewnessValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialKurtosisValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovarianceMatrixValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMeanVectorValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCentralMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialFourthMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialThirdMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSecondMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialProductValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMeanValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovarianceValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialVarianceValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSkewnessValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialKurtosisValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovarianceMatrixValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMeanVectorValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCentralMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialFourthMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialThirdMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSecondMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialProductValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMeanValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovarianceValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialVarianceValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSkewnessValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialKurtosisValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovarianceMatrixValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMeanVectorValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCentralMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialFourthMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialThirdMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSecondMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialProductValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMeanValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovarianceValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialVarianceValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSkewnessValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialKurtosisValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovarianceMatrixValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMeanVectorValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCentralMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialFourthMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialThirdMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSecondMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialProductValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMeanValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovarianceValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialVarianceValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSkewnessValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialKurtosisValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovarianceMatrixValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMeanVectorValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCentralMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialFourthMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialThirdMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSecondMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialProductValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMeanValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovarianceValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialVarianceValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSkewnessValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialKurtosisValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovarianceMatrixValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMeanVectorValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCentralMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialFourthMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialThirdMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSecondMomentValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialProductValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialMeanValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialCovarianceValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialVarianceValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialSkewnessValue;
import org.apache.commons.math3.stat.descriptive.moment.VectorialKurtosisValue;
import org.apache.commons.math3