I have wrote about screen command long back. But I'm writing it again because last few days I was fighting with network connectivity issues. screen is your best friend when you have a bad connection.
Suppose you are running a bash script. What if you lost connection in between? script fails.
How to use?
You can create a screen and run the script inside the screen. You can detach and attach to the screen later whenever you want. Even if the connection fails between your remote server and laptop; the script will execute safe inside screen.
In this post we will see how to use screen in Redhat / Centos Linux.
#yum install screen
Then execute the command you want
To detatch screen
press "Ctrl+a" , then press "d"
To list the screen sessions
[root@server ~]# screen
[root@server ~]# screen -ls
There is a screen on:
3063.pts-0.server (Detached) #Lists the existing screen session ids.
To attach a screen again
# screen -r screen_id
[root@server ~]# screen -r 3063.pts-0.server
To name a screen while creating
# screen -S name_of_screen
To wipe off a dead screen
#screen -wipe screen_id
If you have only one screen. You can attach it by executing
If you want to attach to a already attached screen
#screen -D -r screen_id
Wednesday, December 11, 2013
Friday, November 15, 2013
Amazon Elastic transcoder is a service from amazon in amazon web services to transcode videos from one format to another format. It relatively a new tool in aws but recently they have added a lot of features to it. The latest one is the clip generation. Its a very easy thing.
Thursday, November 7, 2013
XCache is a fast, stable PHP opcode cacher. It accelerates the performance of PHP on servers. It increases the performance by removing the repeated compilation time of PHP scripts by caching the compiled state of PHP scripts into the RAM and uses the compiled version from the RAM thus saving the compilation time again. This will increase the speed up to 5 times.