terminal.cab

All commands

touch

Topic: Files and folders

Program: touch

Makes empty files or sets their time to now.

Package: core-nav

Usage

touch [OPTION]... FILE...

Description

Set the access and modification time of each FILE to now. A FILE that does not exist is made, empty.

Options in the simulator

10 more options of the real program, not in the simulator yet
  • -a not in the simulator yet

    Explanation to come

  • -c, --no-create not in the simulator yet

    Explanation to come

  • -d, --date needs a value not in the simulator yet

    Explanation to come

  • -f not in the simulator yet

    Explanation to come

  • -h, --no-dereference not in the simulator yet

    Explanation to come

  • -m not in the simulator yet

    Explanation to come

  • -r, --reference needs a value not in the simulator yet

    Explanation to come

  • -t needs a value not in the simulator yet

    Explanation to come

  • --time needs a value not in the simulator yet

    Explanation to come

  • --version not in the simulator yet

    On a real system it prints the version of the program.

Examples

From the lesson Creating folders and files
touch Documents/ideas.txt
ls -l Documents/ideas.txt
-rw-r--r-- 1 lerner lerner 0 Oct 17 09:00 Documents/ideas.txt

Try it in the terminal

From the lesson Create, copy, move
touch TODO.md
ls -l TODO.md
-rw-r--r-- 1 lerner lerner 0 Oct 17 09:42 TODO.md

Try it in the terminal

From the command of the day: touch
ls -l todo.txt
-rw-r--r-- 1 lerner lerner 37 Oct 17 08:15 todo.txt
touch todo.txt
ls -l todo.txt
-rw-r--r-- 1 lerner lerner 37 Oct 17 09:00 todo.txt

Try it in the terminal

Where you learn it

Lessons

Command of the day

All commands