Archive for the ‘shell’ Category

There is no screen to be resumed…

I was running a script on a server that took a while to complete. Since I did not want to lose any output I ran it inside a screen session. Of course, during the course of this, my SSH connection dropped and when I logged in again, and tried to reattached to the session I […]

Posted on November 15, 2013 at 08:56 by somedude · Permalink · Leave a comment
In: linux, linux tips, linux utilities, screen, shell

Copying directories with tar

This is one of those, “can’t seem to memorize something” posts… Sometimes copying files with cp is just painful. Instead: [root@sparky ~]# mkdir /tmp/newopt && mount /dev/mapper/system-opt /tmp/newopt [root@sparky ~]# ( cd /opt && tar –xattrs -cf – . ) | ( cd /tmp/newopt && tar xvfp – ) This will copy files and directories […]

Posted on May 27, 2013 at 09:48 by somedude · Permalink · Leave a comment
In: linux, linux tips, shell, solaris, solaris tips

Resetting readonly shell variable

Recently I inherited a RedHat server, which had system-wide user profile configured something like this: TMOUT=300 readonly TMOUT export TMOUT This was extremely irritating. Spending a few momnents looking at docs and session would time out. The same was true for screen, detached sessions would close. All in all virtually nothing could be done. Then […]

Posted on June 22, 2012 at 09:01 by somedude · Permalink · Leave a comment
In: centos, linux, linux tips, redhat, shell, solaris, solaris tips