How do I Compress a Whole Linux or UNIX Directory? Rumi, June 10, 2010 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 Where, -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 Where, -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 - Related Administrations Configurations (Linux)
Reset Owncloud User password using cli April 30, 2020 Browse to your owncloud installed path, in my case it was /var/www/html/owncloud and apply the following command- sudo -u www-data php occ user:resetpassword — <username> Enter a new password: Confirm the new password: You’re done. Related Read More
Monitor MySQL database restore progress with pv January 12, 2013 The pv command is one that I really enjoy using but it's also one that I often forget about. You can't get a much more concise definition of what pv does than this one: pv allows a user to see the progress of data through a pipeline, by giving information… Read More
Testing Freeradius of Pfsense April 4, 2016April 4, 2016 FreeRADIUS offers an easy to use command line tool to check if the server is running and listening to incoming requests. Aninterface, a NAS/Client and a user must all be configured: Add a User with the following configuration:Username: testuser Password: testpassword Add a Client/NAS with the following configuration:IP-Address: 127.0.0.1 Shared… Read More