Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this in my ~/.screenrc file:

startup_message off

screen -t top 0 top
screen -t log 2 tail -f /path/to/application/log/*
screen -t action 1

#caption always "%?%F%{.R.}%?%3n %t%? [%h]%?"
hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<" 

When I start screen, it opens all three windows, but as soon as I try to switch to window 2, it closes immediately. I would assume there is a problem with the shell and it exits instantly, but I can't find anything wrong with it. I have tried using quotation marks around the path and the entire command, which only leads to "file not found" errors. The command works just fine when I enter it directly into a shell.

The screen version is: Screen version 4.00.02 (FAU) 5-Dec-03


share|improve this question

I suspect that the problem is that the wildcard in /path/to/application/log/* isn't being expanded, since screen isn't a shell itself. Try executing the command within a shell:

screen -t log 2 sh -c "tail -F /path/to/application/log/*"
share|improve this answer

Your Answer


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.