Spread and use Firefox
Advertise on this blog!
-->

Subscribe to my posts via Email


Delivered by FeedBurner

I'm an Indian
Darn proud of being an Indian!

Links...

Categories

Archives

Friends



Subscribe





External Links


July 11, 2006

(Posted at 5:18 am)

Escaping those commands…

If you work like me, editing & moving files constantly between two users on the same linux box, you know that copying files from one home directory to another is hell! Specially because each time you have to switch to root, copy & then chown it to the new user!

I’ve got a better idea…
1) Open /etc/hosts file & add a very short name for your localhost, like “a” or “b” or something small.
2) Now when you want to copy, use scp [to localhost] instead of cp. It will automatically do the things for you :)

Though there might be other *smart* hacks to do this, i’m pretty content with this one.

cool hack

Comment by vishal — July 11, 2006 @ 6:52 am

vishal, what did you used to do in such a situation? I’m pretty sure you must have faced such a thing when you work on your servers?

Comment by makuchaku — July 11, 2006 @ 7:16 am

i dont do anything else then dance man :P i created another user (normal user ) which i use to do these things it has some rights like instead of using root account for everything i use this account so need not tochange permissions everytime i do some copying or creating something new

Comment by vishal — July 11, 2006 @ 7:43 am

Hmm…

Comment by makuchaku — July 12, 2006 @ 12:47 am

Nice hack, Well i never worked with two users, But aren`t users in same group have read permission to the FIles.

Comment by rocky — July 12, 2006 @ 6:43 am

You don’t even need to alter /etc/hosts. “0” is one of the default aliases for “localhost”.

Comment by Kai — July 12, 2006 @ 4:56 pm

Oh wow!

Thanks.

Comment by makuchaku — July 13, 2006 @ 2:06 am

Leave a comment

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image