-1

According to this answer, I can rename logfile of screen with date to avoid logfile appending problem

But %c used in that answer contains a colon, like 19:00. Since I have to sync files with windows, while windows won't accept colon in filename.

So according Linux: Bash Get Time, I tried

logfile ./screenlog-%n-%H%M%S

But, I got different inteperation. %H becomes the name of logging node, %M becomes Apr, %S becomes 0S

What is wrong? How to get correct date and time in .screenrc ?

user15964
  • 713

1 Answers1

2

In "Bash Get Time", they describe the arguments to date command. screen uses a similar format, but the arguments are different. Check out the "String Escapes" section of the manual (also available in the man page) for details.

As far as I can see, there's no way to achieve what you want. Perhaps seconds (%s) will suffice?

  • Thank you very much. That is the list I am looking for. But is there really no way to manipulate the filename to delete the semicolon? – user15964 Apr 30 '16 at 11:20
  • Unfortunately, no, there's no way to do that with Screen. You might be able to work around that by creating symbolic or hard links ("log.141532" → "log.14:15:32") and syncing those instead of the original files. perl-rename --link-only 's/://g' log.* will help you here. – Alexander Batischev Apr 30 '16 at 11:29