Friday, May 3, 2024
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 45064  / 2 Years ago, mon, july 4, 2022, 10:11:06

What does the command 'touch' when applied to a directory?



$ mkdir test
$ ls -l test
drwxrwxr-x 2 dragos dragos 4096 Oct 27 18:08 test
$ touch test
$ ls -l
drwxrwxr-x 2 dragos dragos 4096 Oct 27 18:08 test

More From » command-line

 Answers
1

As stated in the manpage, the primary use of touch is this:




Update the access and modification times of each FILE to the
current time.




So it updates the access and modification times of the directory.


[#28709] Tuesday, July 5, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
otatorm

Total Points: 218
Total Questions: 113
Total Answers: 124

Location: British Indian Ocean Territory
Member since Tue, Feb 22, 2022
2 Years ago
otatorm questions
;