Home » mariadb on ubuntu » UNIX/LINUX Command – touch

UNIX/LINUX Command – touch

Last updated Apr 25, 2021

NAME

touch—Change file timestamps

SYNOPSIS

touch [-acfm] [-r reference-file] [-t MMDDhhmm[[CC]YY][.ss]] [-d time] [–time={atime, access, use, mtime, modify}] [–date=time] [–file=reference-file] [–no-create] [–help] [–version] file…

DESCRIPTION

This manual page documents the GNU version of touch. touch changes the access and modification times of each given file to the current time. Files that do not exist are created empty. If the first filename given would be a valid argument to the -t option and no timestamp is given with any of the -d, -r, or -t options and the — argument is not given, that argument is interpreted as the time for the other files instead of as a filename.

If changing both the access and modification times to the current time, touch can change the timestamps for files that the user running it does not own but has write permission for. Otherwise, the user must own the files.

OPTIONS

Options Description
-a, –time=atime, –time=access, –time=use Change the access time only.
-c, –no-create Do not create files that do not exist.
-d, –date time Use time (which can be in various common formats) instead of the current time. It can contain month names, time zones, am and pm, and so on.
-f Ignored; for compatibility with BSD versions of touch.
-m, –time=mtime, –time=modify Change the modification time only.
-r, –file reference-file Use the times of reference-file instead of the current time.
-t MMDDhhmm[[CC]YY][.ss] Use the argument (months, days, hours, minutes, optional century and years, optional seconds) instead of the current time.
–help Print a usage message on standard output and exit successfully.
–version Print version information on standard output, then exit successfully.

Related Posts

UNIX/LINUX Command – rsync

UNIX/LINUX Command – rsync

NAME rsync – a fast, versatile, remote (and local) file-copying tool rsync Command SYNOPSIS Local: rsync [OPTION…] SRC… [DEST] Access via remote shell:Pull: rsync [OPTION…] [USER@]HOST:SRC… [DEST]Push: rsync [OPTION…] SRC… [USER@]HOST:DEST Access via rsync...

UNIX/LINUX Command – strip

UNIX/LINUX Command – strip

NAME strip—Discard symbols from object files. SYNOPSIS strip [ -Fbfdname|–target=bfdname ] [ -Ibfdname|–input-target=bfdname ] [ -Obfdname|–output-target=bfdname ] [-Rsectionname|–remove-section=sectionname ] [ -s|–strip-all ] [-S|-g|–strip-debug ][-x|–discard-all...

UNIX/LINUX Command – expand

UNIX/LINUX Command – expand

NAME expand—Convert tabs to spaces SYNOPSIS expand [–tab1[,tab2[,…]]] [–t tab1[,tab2[,…]]] [–i] [—tabs=tab1[,tab2[,…]]] [–initial] [–help] [–version] [file…] DESCRIPTION This manual page documents the GNU version of expand. expand writes the contents of each given...

UNIX/LINUX Command – uuencode

UNIX/LINUX Command – uuencode

NAME uuencode—Encode a binary fileuudecode—Decode a file created by uuencode SYNOPSIS uuencode [-m] [ file ] nameuudecode [-o outfile] [ file ]… DESCRIPTION uuencode and uudecode are used to transmit binary files over transmission mediums that do not support other...

Follow Us

Our Communities

The Ultimate Managed Hosting Platform
Load WordPress Sites in as fast as 37ms!

0 Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

3 × 4 =

Shares