Linux Commands
Commands
ls
cd
mkdir
cat
more
head
tail
touch
rm
How To
Change Prompt

touch - command in linux



touch - command in linux

Updates the access time and modification time of each FILE to the current time.

filename if not exist will be created with empty, if option -c or -h is supplied it will not create.

filename string of - is handled differently and causes touch to change the times of the file associated with standard output.

syntax

touch [filename]

example

 touch myfile.txt

if file present, it will update access time and modification time to current time, otherwise it will create a new file.


file will not be created if not exists

 touch -c myfile.txt

options

OptionDescription
-aupdate only access time of the file
-c, --no-createdont create file if not exists
-d, --date=STRINGupdates with date-time supplied in STRING instead of current time
-h, --no-dereference
-mupdate only modification time of the file
-r, --reference=FILEuse the referenced file timestamp instead of current time
-t STAMPupdate with [[CC]YY]MMDDhhmm[.ss] time instead of current time
--time=WORDupdate the specified time: WORD is access, atime
--helpdisplays help


rm

rm command in linux

posted on 2019-10-24 21:34:18 - Linux Commands Tutorials


touch

touch command in linux

posted on 2019-10-23 19:41:20 - Linux Commands Tutorials


tail

tail command in linux

posted on 2019-10-23 19:10:42 - Linux Commands Tutorials


Prompt Examples

ChatGPT Prompt Examples

posted on 2023-06-21 22:37:19 - ChatGPT Tutorials


Use Cases

Chat GPT Key Use Cases

posted on 2023-06-21 21:03:17 - ChatGPT Tutorials


Prompt Frameworks

Prompt Frameworks

posted on 2023-06-21 19:33:06 - ChatGPT Tutorials