Difference between revisions of "Touch (command)"
Jump to navigation
Jump to search
↑ https://en.wikipedia.org/wiki/Touch_(command)
Line 30: | Line 30: | ||
* <code>[[type]] nul > [[authorized_key]]</code> ([[Windows]]) | * <code>[[type]] nul > [[authorized_key]]</code> ([[Windows]]) | ||
* <code>[[rm]]</code> | * <code>[[rm]]</code> | ||
− | * <code>[[mkdir -p]]</code> | + | * <code>[[mkdir -p]]</code> or <code>[[mkdir --parents]]</code> |
* <code>[[install]] -D /dev/null /path/to/createfile.txt</code> | * <code>[[install]] -D /dev/null /path/to/createfile.txt</code> | ||
Revision as of 11:50, 17 May 2022
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 file.txt touch: cannot touch 'file.txt': Read-only file system
touch .pg_service.conf
missing file operand
touch touch: missing file operand Try 'touch --help' for more information.
Related commands
truncate
fallocate
type nul > authorized_key
(Windows)rm
mkdir -p
ormkdir --parents
install -D /dev/null /path/to/createfile.txt
See also
- file, File system, directory,
touch
,mkdir
,ls
,ln
truncate
,fallocate
,split
,stat
, inode, File descriptor, superblock, block size (blockdev
),fuser
,lsof
,scrub
,chattr
, ulimit (nofiles),cp
,mv
,file (command)
,mkfifo
,chmod
Advertising: