Using screen in Linux to save your bacon

Posted on February 28, 2010 at 11:08 pm in

Tonight I’m being plagued by dropped ssh connections. 2 minutes of work, them bam everything goes away. I’ve seen screen used in the past, but never had to use its power until tonight. Ask any seasoned sysadmin and they’ll tell you that screen has saved their bacon many times, and it did for me tonight.…

Using screen in Linux to save your bacon - continue reading

Comment on Using screen in Linux to save your bacon


SYSSTAT: SAR/IOSTAT

Posted on February 25, 2010 at 1:30 pm in

The pidstat command is used to monitor processes and threads currently being managed by the Linux kernel. It can also monitor the children of those processes and threads.
With its -d option, pidstat can report I/O statistics, providing that you have a recent Linux kernel (2.6.20+) with the option CONFIG_TASK_IO_ACCOUNTING compiled in. So imagine that your…

SYSSTAT: SAR/IOSTAT - continue reading

Comment on SYSSTAT: SAR/IOSTAT

Tags:

Quick SCP

Posted on February 25, 2010 at 11:39 am in

Logged into source host
scp -r -p * root@remotehost:/home/user/public_html
This will copy *all* files to the directory /home/user/public_html in the remote server remotehost. The -p preserves the modification and access times, as well as the permissions of the source-file in the destination-file. The -r copies the contents of the source-file (directory in this case) recursively.

Quick SCP - continue reading

Comment on Quick SCP

Tags:

SCP / SSH recipes

Posted on February 3, 2010 at 8:15 am in

scp [[user@]from-host:]source-file [[user@]to-host:][destination-file]
Description of options

from-host
Is the name or IP of the host where the source file is, this can be omitted if the from-host is the host where you are actually issuing the command
user
Is the user which have the right to access the file and directory that is supposed to be…

SCP / SSH recipes - continue reading

Comment on SCP / SSH recipes


Find to copy files into single directory

Posted on January 20, 2010 at 4:49 pm in

Makes copy of subset of dir/ and below with files that match the criteria. It keeps the nested directory structure. Uses
-print0 | xargs -0

to handle spaces in Windows names
find /cygdrive/f/dir1/ -name ‘*.doc’ -print0 | xargs -0 cp -a –target-directory=/cygdrive/c/Temp –parents

Find to copy files into single directory - continue reading

Comment on Find to copy files into single directory


Updated find to list script

Posted on January 20, 2010 at 3:52 pm in

This is an update to the earlier script.

#!/bin/sh
# v1 jcz 30-dec-2009
# This is a silly little script that will search
# for files of a certain type and create a text file of the results
# TODO:
#  – Everything
# – Fix this script to run under cygwin 1.7.X after working fine under 1.5.X

############################
# enable for debugging #####
############################
#…

Updated find to list script - continue reading

Comment on Updated find to list script


Search lister

Posted on December 30, 2009 at 12:56 pm in

This little script needs a lot of help But it will recurse down through the current directory and create a listing of files, their folders, sizes, and modification dates and times. it was written to run on Windows under Cygwin.

#!/bin/sh
# v1 jcz 30-dec-2009
# This script will search for files of a certain type and create…

Search lister - continue reading

Comment on Search lister


Linux/UNIX/Cygwin find command

Posted on December 30, 2009 at 11:16 am in

This is another one of those notes to myself because I look this stuff up every six months.
Basics of find. The following is a complete rip off of the content at: http://content.hccfl.edu/pollock/unix/findcmd.htm
But I wanted to keep a copy safe here. Thanks Wayne Pollock on 12/30/2009 10:27:30.
FIND

The -print action lists the names of files separated by…

Linux/UNIX/Cygwin find command - continue reading

Comment on Linux/UNIX/Cygwin find command


How to set a static IP in Ubuntu from the shell

Posted on December 4, 2008 at 7:49 pm in

Edit

/etc/network/interfaces
and adjust it to your needs (in this example setup I will use the IP address 192.168.0.100):
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# This is a list of hotpluggable network interfaces.
# They will…

How to set a static IP in Ubuntu from the shell - continue reading

Comment on How to set a static IP in Ubuntu from the shell


Remastersys Notes

Posted on September 27, 2008 at 9:12 pm in

My latest project is to turn my favorite Linux desktop configurations into stand alone distributions that I can run as LiveCDs or install anywhere.
Here are some links so that I don’t forget.
http://www.ubuntugeek.com/creating-custom-ubuntu-live-cd-with-remastersys.html

Remastersys Notes - continue reading

Comment on Remastersys Notes


Top