Clever chaps will have noticed you can just use the ‘&’ like so:
Q. How can I compress a whole directory under Linux / UNIX using a shell prompt?
A. It is very easy to compress a Whole Linux/UNIX directory. It is useful to backup files, email all files, or even to send software you have created to friends. Technically, it is called as a compressed archive. GNU tar command is best for this work. It can be use on remote Linux or UNIX server. It does two things for you:
=> Create the archive
=> Compress the archive
You need to use tar command as follows (syntax of 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, you have directory called /home/jerry/prog and you would like to compress this directory then you can type tar command as follows: $ tar -zcvf prog-1-jan-2005.tar.gz /home/jerry/prog
Above command will create an archive file called prog-1-jan-2005.tar.gz in current directory. If you wish to restore your archive then you need to use following command (it will extract all files in current directory): $ tar -zxvf prog-1-jan-2005.tar.gz
-x: Extract files
If you wish to extract files in particular directory, for example in /tmp then you need to use following command: $ tar -zxvf prog-1-jan-2005.tar.gz -C /tmp
$ cd /tmp
$ ls -
Linux on the desktop is making great progress. However, the real beauty of Linux and Unix like operating system lies beneath the surface at the command prompt. nixCraft picks his best open source terminal applications of 2012.
Most of the following tools are packaged by all major Linux distributions and can be installed on *BSD or Apple OS X.
#1: siege – An HTTP/HTTPS stress load tester
Fig.01: siege in action
Siege is a multi-threaded http or https load testing and benchmarking utility. This tool allows me to measure the performance of web apps under duress. I often use this tool test a web server and apps. I have had very good results with this tool. It can stress a single url such as example.com/foo.php or multiple urls. At the end of each test you will get all data about the web server performance, total data transferred, latency, server response time, concurrency and much more. Continue reading →
Today we’re going to review another basic yet powerful concept that Git among other version control systems of its type has: distribution! As you may know, your commits are all local, and repositories are simply clones of each other. That means the real work in distributing your projects is in synchronizing the changes via git push and git pull.
If you’re new to Git, you may think that this is too much overhead and one that leads to a breakdown of control. Look at it this way: if your central server goes down, you’re usually hosed and prevented from working and collaborating with others. Since all of the work involved with actually creating revisions is done on your own machine, you can code whether the network is down without the permission of others or being subject to network issues. Did I mention it’s a lot faster too for most routine operations? Check out some more of advantages (and disadvantages) of DVCS at Wikipedia. Continue reading →
I’ve been used the ImageMagick convert tool to make JPG images from PDF pages. Nothing too fancy, just generating a single 8.5 x 11 inch ratio JPG for each page in a PDF. This worked really well until I started seeing some PDF files generate the same size JPG, but instead of the page taking up the whole image it was about one quarter size, in the lower left corner.
Inspecting the PDFs showed that they had much larger dimensions. So I tried tweaking several settings; density, scale, resize and resample, all with no luck. No matter how I adjusted the settings I couldn’t get the page to use the whole image size. After more searching and trial and error I finally came across the information I needed to make this work, the define option. Specifically: -define pdf:use-cropbox=true. Continue reading →
How do I determine if my CPU is 64bit or not under Linux operating systems?
You need to use the uname command, which prints system information including kernel version and whether kernel is 32 bit or 64 bit. You need to run the less /proc/cpuinfo command to determine if CPU is 64 bit or not. Continue reading →