: bad interpreter: No such file or directory

September 29, 2008

Sometimes when I run the shell scripts in Linux, It gives me error “: bad interpreter: No such file or directory”. The issue raised whenever I transfer my scripts from windows to Linux.

A Perl command can resolves the issue easily.

Try the following command on your text file then try and run it.

perl -i -pe’s/\r$//;’ <file name here>


Searchin using find command

June 28, 2008

Good Tutorial for find command’s exercise.

http://www.linuxquestions.org/linux/answers/Applications_GUI_Multimedia/Find_command_0

http://www.linux.ie/newusers/beginners-linux-guide/find.php


How to resolve “mv: Argument list too long”

June 27, 2008

I have 1,30,000 files to move from one directory to another, When I ran command

# mv *.txt test

Oh!! There is an error

mv: Argument list too long.

What to do? I did it but in different way. I ran command

#find . -maxdepth 1 -name ‘*.txt’ -exec mv ‘{}’ test \;

Here

.                      defines search directory

-maxdepth     disables recursive search and searches only in the current directory. It allows you to control

how deep into sub directories it will recurs. With ‘-maxdepth’ 1 it will only search in current

directory.

-name             string to be searched

-exec              Applies a command to set of file that has been searched

{}                      Inserts each found file into given command after -exec

\;                     Indicates the exec command line has ended

The above example searches for *.txt files in current directory and moves it to the test directory.

More:    http://www.athabascau.ca/html/depts/compserv/webunit/HOWTO/find.htm


PCS office visit for the Salary Account

June 4, 2008

All employees got their salary but I did not. This was my first month at PCS. The thing was in my mind that, definitely I will have to face problem for the first salary. I called Nikunj for the same and he made follow up.

After all I got Application form from the ICICI Bank – Ashram Road and went to the PCS office to meet Ripal regarding salary account.

After that When I got back to the office Nikunj called me that there is a hole in one of the Server. I found that It was not hole but the package was not updated, that was done after that.

And everything else passed smoothly.