Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-25-2010, 10:22 PM   #1
Registered: Aug 2003
Posts: 45

Rep: Reputation: 15
touch command question

Hi All,

Although i'm pretty sure of the output of "touch" command, i want to confirm as it is a PROD env.

lrwxrwxrwx 1 root system 21 Dec 31 1969 dir -> /appl/firstdir/seconddir

If i want to change the timestamp of the link above, what will be the problem? NOTE: i'm not using root account.

$touch dir
Old 01-25-2010, 10:28 PM   #2
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
touching the dir or the symlink will result in the same thing: the timestamp will be updated to the current time (though the man page does allow for giving a different timestamp too, but usual usage is just `touch file`)

EDIT: touching the DIR does not update the timestamp of the symlink (I just tested it).

Last edited by GrapefruiTgirl; 01-25-2010 at 10:30 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Behavior of Command Line Expansion in touch command ahmedb72 Linux - Newbie 10 07-01-2009 02:51 AM
tips with touch command rajveervashisth Linux - Newbie 2 08-06-2008 01:22 PM
touch command not found Mystified Linux From Scratch 1 03-28-2005 11:38 AM
touch command dominant Linux - Newbie 6 02-17-2004 04:57 PM
'touch' command on subtree/files stoffell Linux - Software 2 09-23-2003 10:40 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:53 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration