Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm rather new to this server-config stuff.

I'm following the ubuntu tutorial on OpenSSL and I came across the command echo '01' > serial && touch index.txt and i'm not quite sure what it's doing. I read something about 'touch' doing something with a timestamp.

What does the touch filename.txt command do exactly?

It seems to send me into some weird prompt that I do not know how to get out of.

share|improve this question
1  
An example of the "weird prompt" would be useful. –  womble Jan 11 '10 at 0:07
    
Weird prompt is almost certainly the PS2 secondary prompt, as kaerast diagnosed. –  Schof Jan 11 '10 at 7:08
    
kaerast was in fact correct. After entering the command it would return to a new line with a >. Thanks for being understanding - I'm venturing into the unknown with this server stuff! –  Derek Adair Jan 12 '10 at 14:22
add comment

1 Answer

up vote 10 down vote accepted

The weird prompt will be because you aren't closing the quotation marks properly - try typing in rather than copy/pasting, on some websites the quotation marks are converted into pretty ones rather than ones which are usable in the shell.

touch filename.txt will set the last modified time of filename.txt to the current time and, if the file didn't already exist, will create it (presuming you have permissions to do all that of course).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.