Difference between revisions of "Touch (command)"

From wikieduonline
Jump to navigation Jump to search
Line 5: Line 5:
 
*<code>touch [[/etc/resolv.conf]]</code>
 
*<code>touch [[/etc/resolv.conf]]</code>
 
*<code>touch: cannot touch '/etc/resolv.conf': No such file or directory</code>
 
*<code>touch: cannot touch '/etc/resolv.conf': No such file or directory</code>
 +
  
 
*<code>touch file.txt</code>
 
*<code>touch file.txt</code>
 
*<code>touch: cannot touch 'file.txt': [[Read-only file system]]</code>
 
*<code>touch: cannot touch 'file.txt': [[Read-only file system]]</code>
 +
  
 
*<code>[[touch]] ~/[[.ssh]]/[[authorized_keys]]</code>
 
*<code>[[touch]] ~/[[.ssh]]/[[authorized_keys]]</code>
 +
  
 
*<code>touch [[.pg_service.conf]]</code>
 
*<code>touch [[.pg_service.conf]]</code>

Revision as of 21:22, 4 October 2021

touch[1] is a command used to update the access date and/or modification date of a computer file or directory or to create it.


  • touch /etc/resolv.conf
  • touch: cannot touch '/etc/resolv.conf': No such file or directory




 touch
touch: missing file operand
Try 'touch --help' for more information.


Related commands

install -D /dev/null /path/to/createfile.txt

See also

  • https://en.wikipedia.org/wiki/Touch_(command)
  • Advertising: