Some useful Linux commands for teamwork

Summary

For development teams on Linux, several command-line utilities streamline collaboration and file sharing. Program execution results and logs can be piped directly to a teammate's GTalk using a tool like `gpipe.py`, significantly speeding up debugging workflows. Small files, such as source code, are easily sent as email attachments via `mutt`, a command that can be encapsulated in shell scripts for rapid use. For sharing larger files within an intranet, a temporary HTTP server can be quickly spun up with `python -m SimpleHTTPServer`, while NFS provides a stable, cross-platform solution for persistent shared folders.

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 protected]

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 $* [email protected]

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/

LINUX HTTP NFS GTALK

  RELATED

  COMMENTS

0

No comment for this article.