Posts

Showing posts from May, 2005

LINUX - How to Compress a Whole Directory

1.Use the tar command. tar -zcvf archive-name.tar.gz directory-name -z : Compress archive using gzip program -c: Create archive -v: Verbose i.e display progress while creating archive -f: Archive File name For example, say you have a directory called /home/admin/workspace and you would like to compress this directory then you can type tar command as follows: $ tar -zcvf src.tar.gz /home/admin/workspace If you wish to restore your archive then you need to use the following command $ tar -zcvf src.tar.gz /home/admin/workspace -x: Extract files Advanced. tar -jcvf src.tar.bz2 /home/admin/workspace # even more compression #change the -c to -x to above to extract 2.Use the zip command. $ zip -r file-name.zip /path/to/directory $ unzip file-name.zip

ANT tutorial (Ant is a Java-based build tool)

1. Ant 的最小构成 build.xml <?xml version="1.0" encoding="utf-8" ?> <project> </project> 在build.xml同一目录下,运行ant. D:\ant>ant Buildfile: build.xml BUILD SUCCESSFUL Total time: 0 seconds Congratulations!!! Your first ant program completed successfully! 1.尝试在屏幕上打印一些信息 我们在项目中用ant的时候经常会看到先会在屏幕上打印出很多信息。 tag:target 我们来做这个例子 <?xml version="1.0" encoding="utf-8" ?> <project default="help"> <target name="help"> <echo message="    ノ⌒ヽ、_ノ⌒ヽ、_ノ⌒ヽ、_ノ⌒ヽ、_ノ⌒ヽ、"/> <echo message="  /                            )"/> <echo message="  (                            /"/> <echo message="  )         でろでろ          ("/> <echo message="  /                          )"/> <echo message=" (                           /"/> <echo message="  ⌒|/⌒ヽ、_ノ⌒ヽ、_ノ⌒ヽ、_ノ⌒ヽ、_ノ"/> </target> </pro...