Monthly Archives: September 2007

How to cheat 'Argument list too long' error while using wildcards

The problem is that the linux terminal shell has a limit to the length of the command line arguments.

And this can vary from kernel to kernel basis, depends on the kernel configuration during kernel compilation.

So most of the time this will not be an issue but if your trying to manipulate multiple files in Linux console using the ‘*’ expansion you might run it to this problem. Especially if you are using older Linux systems, or Linux running on old hardware as the argument length might have been shortened during kernel because of lack of memory.

An example command which might generate this error.

$rm *
bash: /usr/bin/rm: Argument list too long

this command should remove all files in the current director, but if the number of files are huge, you will run into argument list too long error.

To make this work u can use one of these two methods.

1. Use find command

To use find you have to make find parse though the file list and execute rm on each file one by one.

To do this the command would be.

$ find ./ -type f -exec rm {} \;

here rm is the command and {} is the parameter to the command, in find {} means the current file name.

2. Use for loop

The syntax of for can vary form shell to shell. But a generic sh syntax would be.

$ for file in $(ls -1);  do  {  rm $file } ; done

In this the $file variable contains the file name taken from the $(ls -1 ) list which the for loop loops though, and this $file variable is passed to the rm to remove.

Hope that this helps all of you who encounter this issue a lot.

Project S.A.N. – The Begining

In computing, a storage area network (SAN) is an architecture to attach remote computer storage devices (such as disk arrays, tape libraries and optical jukeboxes) to servers in such a way that, to the operating system, the devices appear as locally attached.

So what does it consist of … well who knows, so then i go poking around the net.. looking for clues as to how build one from scratch. So looking into what exactly a SAN is… well think of it as your office store room… everyone stores their stuff in it, and hopefully its huge so u have lots of space.And if anyone find it becoming too small.. u just make the storeroom bigger and everyone benefits from this. SAN is just like this.. but instead of room space we have disk space.

So here goes… what you have been waiting for… what does a SAN consit of…

Fiber Channel Switches (aka SAN Fabric)

Since switches form the intelligent foundation of your SAN, it’s important to select the right ones for your business requirements.

Storage Devices

There are many types of disk and tape storage devices available that meet a wide variety of storage requirements. Make sure the devices are Fibre Channel ready. Integrating a variety of devices into your SAN allows you to allocate storage based upon cost, availability, and performance criteria. If critical application data is stored on a device, you’ll want to have that device dual-attached to your fabric to ensure high availability. That requires double the number of Fibre Channel connections on that device.

Host Bus Adapters (HBAs)

The requirements of the applications that will run on your SAN should help drive what type of HBAs you need on your hosts. From the available 1 Gbit/sec, 2 Gbit/sec, and auto-sensing speeds, choose the speed needed to match your current and future data throughput requirements. If critical applications are running on a host, you’ll want to have that host dual-attached to your fabric to ensure high availability. That requires double the number of HBAs for that host.

Cabling

Copper and optical are the two primary types of media used for the physical cabling between the components of your SAN. While copper is less expensive, optical provides a reliable signal over a longer distance. Copper has distance limitations such that it is typically only used within a rack.

To give u an idea… here is what a SAN System would look like…

SAN Diagram

Thats it for now… more on it later

CS Craze…

Now my day revolves around this freaking thing… cs this cs that.. thats all i can think… dying to get on the server everyday… unfortunately to end up dead every now and then… but not before i blast a few heads too.. hehe.

This shit is really addictive.. especially if u enjoy FPS games…

Anyway getting to the point.. if u dont find me in RL… get steam @ steamgames.com and join me and the CS crowd at gaming.mv server

I warn u… it will cost u is a measly US$20 for a lifetime Counter Strike : Source license… but its well worth it if u ask me.

Happy hunting.. and dying to the noobz…

CS Screenshot