Categories

 

March 2011
M T W T F S S
« Aug   Apr »
 123456
78910111213
14151617181920
21222324252627
28293031  

What I'm Doing...

PlaytimePriya and KunalIMG00015.jpgIMG00017.jpgFallColors.jpgSpring

Argument list too long

Ever tried to copy or move a bunch of files on unix/linux from one location to another and see this error message spit out back at you??

$ cp /var/www/* /var/tmp
-bash: /bin/cp: Argument list too long

UNIX find to the rescue…

$ find /var/www -type f -name ‘*’ -exec cp {} /var/tmp/. \;

problem solved!

Share

MAMP - mysqlcheck: Got error: 1045

I started seeing the following error every time I started MAMP. This began after I changed the root password for my MAMP installation on my MBP.

/Applications/MAMP/Library/bin/mysqlcheck: Got error: 1045: Access denied for user ‘root’@'localhost’ (using password: YES) when trying to connect

It turns out that the default password is hard coded in different scripts under ‘/Applications/MAMP/bin’. [...]

Share

Join multiple mpg files into one file

I did not realize how easy it is to join mpeg files with just the windows copy command or unix cat command.

On windows the trick is to copy the files while preserving the binary format. Here is how you would do it -

copy files1.mpg /b + files2.mpg /b joinedfile.mpg

You could also do the following [...]

Share

SSH aliases

I constantly connect to linux or unix machines using ssh and it can get a little bothersome typing out the IP address repeatedly. Here is the typical syntax to connect to a linux box (random IP address)

ssh username@111.11.11.1

Now imagine typing this again and again. Thats where the ssh config file comes to the rescue. You [...]

Share