One Day One Cmd

Place for playing with commands…

Day 10 : $ touch – timestamp

ODOC : In linux we can see file/foder access,modification date & time in its properties. Using "touch" cmd we can modify/update its time
of access/modify date&time.

i.e. whenever we creating one file, the timestamp also created along with it. It will update whenever we access,modify it.
eg: $ touch a.txt. See its properties to view access,modify time.

Now $ touch -t 198708291759 a.txt

Now you can see, the access,modify time is changed from today date,time into 1987yr aug month 29th 5.59pm.

If you again do $ touch a.txt means, the access,modify time & date will be updated with current date & time. 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: