Technical Articles => Operating System =>  Linux/Unix

Some useful Linux commands for teamwork

Source : sonic0002    Date : 2013-01-16 04:36:33  

A small development team in the intranet will frequently transfer codes, share files. Here are some command we use frequently to release some of our work. They are not applicable to Windows users.

1. Output program execution output through GTalk.

Sometimes we may need to send the program execution result and log to teammates for debugging using IM. These outputs are very troublesome to copy and send while in command line mode. So we could have a program called gpipe.py which can put GTalk as a pipe after one program. For example:

make 2>&1 | gpipe tinyfool

With this line, The GTalk client of tinytool will be filled up with the output of make command. This is more efficient than creating a tmp file to store the output.

2. Send file as an attachment

We can accomplish this with one line using matt.

echo “Content” | mutt -s “Subject” -a file email@address.demo

This is very useful if we want to transfer some small files. Especially for source code, it can also serve as backup tool. We can also encapsulate this line into a shell script. For example, create a shell script named sendboss.sh:

echo “Hi, These are the file(s), thanks. Eric” | mutt -s “File” -a $* myboss_email@wustl.edu

So in the future we only need to type sendboss.sh files . You boss will be surprised why you are responding so fast.

3. One line HTTP server

python -m SimpleHTTPServer

This will set the current directory as a root directory of a HTTP server listening to port 8000. In intranet, this will be very useful for sharing big files.

Also you can use wget -c to download file from where it stops last time.

4. NFS share folder

SVN and CVS are very suitable for code and document version control. But for some PDF files or movies which you want to share with the team, you'd better to have a share folder, The simplest way is to use NFS. It's cross platform capable and stable. The detail server configuration can be referred here. For the client, we just need:

mount nfs_server:/dir /mnt/share

This is very convenient for you to share your files.

Source : http://blog.youxu.info/2008/03/20/some-handy-scripts/

Save as PDF Mark as read Mark as important
By clicking the "Mark as read" button, this article will be marked as read. It will be removed from the homepage's latest news and the article list on the "Technical article" page in following visits and it will be put to your read list which you can find in "Amin->Article read list". There you can unmark the read articles.
By clicking the "Mark as important" button, this article will be put to your important article list which you can find in "Amin->Article important list". Later when you want reread this article, it's easier for you to find it by checking the "Article important list".

Tags:Linux,NFS,GTalk,HTTP   Read(385) Comment(0)

Share on Facebook  Share on Twitter  Share on Google+  Share on Weibo  Share on Digg  Share on Tumblr    Delicious 

 Previous : What have been Facebook’s greatest technical accomplishments?
 Next : Strict mode in JavaScript

  ::Related Articles

  ::Comment Zone

No comment for this article.

  ::Comment

Nickname  
Email 
Comment

:: Other versions

No other versions available yet.

:: Recent articles

:: Most read

:: Most commented

:: Contribute

Want to share with the world your understanding about technology? Want to record the process you solve a technical problem? Want to make the world benefit from your understanding and solution? Write them down. You make the world better, the world makes us better.

 Write article

:: Find us

Back to top