Suramya's Blog : Welcome to my crazy life…

January 24, 2006

Editing remote files securely with vim

Filed under: Linux/Unix Related — Suramya @ 4:10 PM

This is something I will be using a lot. Now if the same thing works for emacs my life would be set…

To edit a file on the remote host, you would use the following command:

$ vim scp://suramya@remotehost//home/suramya/testfile

This will use scp to download the file, fire up vim locally to edit it, and upon saving the file, scp it back to the remote host. The basic syntax of the command is:

$ vim scp://user@host/[path_to_file]

——————-
Original Article: Editing remote files securely with vim

Thanks,
Suramya

January 22, 2006

Extract a tar archive relative to the current directory

Filed under: Linux/Unix Related,Tutorials — Suramya @ 9:02 PM

How to extract a tar that looks like relative to the current directory:

$ tar -tvf MyArchive.tar
-rw-r–r– 100/100 58239140 Jan 20 05:17 2006 /home/suramya/bin/File1.dat
-rw-r–r– 100/100 56660587 Jan 19 16:07 2006 /home/suramya/bin/File2.dat

I don’t want to extract these files to /home/suramya/bin I want them relative to my current directory. The GNU tar program does this automatically but the Solaris version doesn’t. To fix this problem use the following command:

pax -r -s ',^/,,' -f MyArchive.tar

This will extract MyArchive.tar in the current directory (By creating a home/suramya/bin directory in the current directory)

Tip courtesy: Solaris IAOQ

– Suramya

November 14, 2005

How to fix your Monitor refresh rate in Debian

Filed under: Computer Tips,Linux/Unix Related — Suramya @ 12:00 AM

The easiest way I have found is to use the ‘gtf’ command. The syntax of the command is:

gtf Horizontal Vertical RefreshRate

so if you wanted a screen resolution of 1024×768 with a 100 hz refresh rate the command would be:

gtf 1024 768 100

and the command will show you a line something like this:

# 1024×768 @ 100.00 Hz (GTF) hsync: 81.40 kHz; pclk: 113.31 MHz
Modeline “1024×768_100.00″ 113.31 1024 1096 1208 1392 768 769 772 814 -HSync +Vsync

Now you need to copy this to the monitor section of the /etc/X11/XF86Config-4

so that it would look something like:

Section “Monitor”
Identifier “Generic Monitor”
Option “DPMS”

# 1024×768 @ 100.00 Hz (GTF) hsync: 81.40 kHz; pclk: 113.31 MHz
Modeline “1024×768_100.00″ 113.31 1024 1096 1208 1392 768 769 772 814 -HSync +Vsync

EndSection

Save the changes and restart the xserver for the changes to take effect.

Hope this helps.

– Suramya

October 28, 2005

Linux Emergency Room

Filed under: Computer Tips,Linux/Unix Related,Tutorials — Suramya @ 12:41 AM

Really good article on how to create and use Emergency recovery tools to recover a crashed Linux system.

Complete Article:
The Linux Emergency Room

– Suramya

May 9, 2005

Debian Sysadmin Resources

Filed under: Knowledgebase,Linux/Unix Related — Suramya @ 2:25 PM

This is a great site with a lot of resources and tips for the Debian System Administrator. Check it out Here

– Suramya

April 15, 2005

Installing Debian From Scratch (DFS)

Filed under: Knowledgebase,Linux/Unix Related — Suramya @ 5:00 PM

I like Debian a lot, the only problem I have with it is that when I install it, it installs a lot of junk on the system that I don’t need.

Linux from Scratch is a distribution that fixes this problem but setting it up is too much work for me plus I really like debian and would like to stick to it. -) Fortunately for me someone else also felt the same and created DFS which allows you to create a customized install like LFS but with the Debian advantages.

Instructions on how to install Debian From Scratch are available here

I will try to install it on my system over the weekend. Will keep you posted.

– Suramya

April 12, 2005

Linux software RAID with mdadm

Filed under: Knowledgebase,Linux/Unix Related — Suramya @ 3:30 PM

Software RAID is an inexpensive way to create instant backups and protect your systems against data loss in the event that one drive fails. Learn some basic RAID management over Here

– Suramya

April 10, 2005

Linux Rootkit detection tools

Filed under: Knowledgebase,Linux/Unix Related — Suramya @ 8:24 PM

According to Wikipedia, A root kit is a set of tools used by an intruder after cracking a computer system. These tools can help the attacker maintain his or her access to the system and use it for malicious purposes.

It is pretty hard to detect a root kit using standard system tools so we need to use specialized detection programs. Below are links to software that detects RootKits in Linux:

Rootkit Hunter:

Rootkit Hunter scans files and systems for known and unknown rootkits, backdoors, and sniffers. The package contains one shell script, a few text-based databases, and optional Perl modules. It should run on almost every Unix clone.

chkrootkit:

chkrootkit is a tool to locally check for signs of a Rootkit.

October 5, 2004

Linux based Live CD’s

Filed under: Linux/Unix Related,Tech Related — Suramya @ 2:56 AM

As you probably know I a big fan of the Linux OS and find it a lot more useful and stable than Windows. Linux has a unique property that it can be installed on and run from the most unlikely systems/devices.

One of the most useful installs are the Linux Live CD’s. These are compressed CD images of a complete linux OS and are available for free with almost no restrictions. A lot of the live distro’s are created with a specific purpose and are fine-tuned for it.

Below is a list of the various Linux Distro’s and what they specialize in:

  • Knoppix: This is one of the most famous Live Linux distro’s. It is based on Debian and contains over 2 GB of software on one CD.
  • Kanotix: This is a Linux Live CD based on KNOPPIX technology using mostly pure Debian/sid. Contains more updated packages than Knoppix.
  • F.I.R.E: FIRE is a portable bootable cdrom based distribution with the goal of providing an immediate environment to perform forensic analysis, incident response, data recovery, virus scanning and vulnerability assessment. Very Useful
  • Penguin Sleuth Kit Bootable CD: A GUI based Bootable CD based on KNOPPIX for forensic previewing of live systems with some security and sys admin tools.
  • War Linux: This distro is dedicated to War Drivers. Officially It’s main intended use is for systems administrators that want to audit and evaluate their wireless network installations but it works great for wardriving also.
  • Ultimate Boot CD: Not exactly a Live Linux distro but still a pretty useful disk to have in your collection. It allows you to run floppy-based diagnostic tools from CDROM drives. It has loads of tools and has saved my backside a couple of times.

A more complete list of Distro’s is available at: http://distrowatch.com/dwres.php?resource=cd

If you have any questions please don’t hesitate to ask. I might not reply immediately but I will try to answer your questions or point you in the right direction (I hope)

– Suramya

« Newer Posts

Powered by WordPress