Today's Question:  What does your personal desk look like?        GIVE A SHOUT

Some useful Linux commands for teamwork

  sonic0002        2013-01-16 04:36:33       2,371        0    

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/

LINUX  HTTP  NFS  GTALK 

Share on Facebook  Share on Twitter  Share on Weibo  Share on Reddit 

  RELATED


  0 COMMENT


No comment for this article.