File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 867867\item cannot change i-node status change time (\texttt {ctime })
868868\item calling process must have write permission for the file
869869\end {itemize }
870+ ifdef([[[NOSPELLCHECK]]], [[[
871+ \texttt {int futimens(int fd, const struct timespec times[2]); }
872+ \texttt {int utimensat(int fd, const char *path, \\
873+ const struct timespec times[2], int flag); }
874+ ]]])
875+ \begin {itemize }
876+ \item allow to set both access and modification time
877+ \end {itemize }
870878\end {slide }
871879
872880\begin {itemize }
873- \item This call is mostly used the by \texttt {cp } and \texttt {mv } commands and
874- also archive utilities to make sure the times are the same for the originals and
875- copies. (e.g. \texttt {tar } or \texttt {rsync }).
881+ \item The \texttt {utime } call is mostly used the by \texttt {cp } and \texttt {mv }
882+ commands and also archive utilities to make sure the times are the same for the
883+ originals and copies. (e.g. \texttt {tar } or \texttt {rsync }).
884+ \item The \texttt {futimens } and \texttt {utimensat } offer greater deal of
885+ flexibility. They allow to set the time to current time, using special
886+ constant in the \texttt {timespec } structure. Also, \texttt {utimensat }
887+ has a flag that controls whether to work directly on a symlink or its target.
876888\item The shell interface for \texttt {utime } is the command \texttt {touch }.
877889\item There is an excellent section \emph {1.7 Dates and Times } in [Butenhof]
878890that goes through various representations of time in Unix systems, and functions
You can’t perform that action at this time.
0 commit comments