From 04eed15fe59042eee48427300429ff05a8667c39 Mon Sep 17 00:00:00 2001 From: Amit Sharma <7789327+amitech@users.noreply.github.com> Date: Tue, 16 Oct 2018 01:34:53 +0530 Subject: [PATCH] Added new "touch" command (#18805) Added new useful touch command used for modifying timestamps --- .../guide/english/bash/bash-touch/index.md | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 client/src/pages/guide/english/bash/bash-touch/index.md diff --git a/client/src/pages/guide/english/bash/bash-touch/index.md b/client/src/pages/guide/english/bash/bash-touch/index.md new file mode 100644 index 00000000000..01e06710331 --- /dev/null +++ b/client/src/pages/guide/english/bash/bash-touch/index.md @@ -0,0 +1,26 @@ +--- +title: Bash touch +--- + +## Bash command: touch + +**Change timestamps of files.** + +``` +touch [options] filename +``` + +Creates empty file if not exists or modify times of existing files to current time. + +Commonly used options: +- `-t` change timestamp to specific date ((YYYYMMDDHHMM.SS)) instead of current time. +- `-r` use timestamp from first file to second file. + +Examples: +``` +touch -t YYYYMMDDHHMM.SS filename +touch -r file1 file2 +``` + +### More Information: +* [Man pages](http://man7.org/linux/man-pages/man1/touch.1.html)