Linux

  1. Home
  2. Computing & Technology
  3. Linux
7.1 Linux Advanced Text Processing Tools
Learn advanced Linux commands
 
 Related Resources
• Linux Newbie Administrator Guide
• 0. Linux Benefit
• 1. Before Installation
• 2. Linux Resources/Help
• 3. Basic Operations FAQ
• 4. Newbie Admin FAQ
• ~ 4.1 Lilo
• ~ 4.2 Drives
• ~ 4.3 X-Windows
• ~ 4.4 Configurations
• ~ 4.5 Networking
5. Shortcuts / Commands
• 6. Linux Applications
• 7. Learn Linux Commands
• A. How to Upgrade Kernel?
 

touch filename

Change the date/time stamp of the file filename to the current time. Create an empty file if the file does not exist.  You can change the stamp to any date using touch -t 200201311759.30 (year 2002 January day 31 time 17:59:30).

There are three date/time values associated with every file on an ext2 filesystem:
- the time of last access to the file (atime)

- the time of last modification to the file (mtime)

- the time of last change to the file's inode (ctime).

Touch will change the first two to the value specified, and the last one always to the current system time. They can all be read using the stat command (see the next entry).

Next > Back to "Learn Linux Commands"

Can't find what you are looking for?
Search the

Stay up-to-date!
Subscribe to the Linux free newsletter.

Explore Linux

About.com Special Features

Linux

  1. Home
  2. Computing & Technology
  3. Linux

©2009 About.com, a part of The New York Times Company.

All rights reserved.