1

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.

3
  • 1
    An example of the "weird prompt" would be useful.
    – womble
    Jan 11, 2010 at 0:07
  • Weird prompt is almost certainly the PS2 secondary prompt, as kaerast diagnosed.
    – Schof
    Jan 11, 2010 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! Jan 12, 2010 at 14:22

1 Answer 1

10

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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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