Difference between revisions of "Linux Administration"

From Hawk Wiki
Jump to: navigation, search
(How to Install SVN on Ubuntu)
(How to Install SVN on Ubuntu)
Line 2: Line 2:
 
http://www.howtogeek.com/howto/ubuntu/install-subversion-with-web-access-on-ubuntu/ <br>
 
http://www.howtogeek.com/howto/ubuntu/install-subversion-with-web-access-on-ubuntu/ <br>
 
http://forums.techarena.in/guides-tutorials/1209507.htm
 
http://forums.techarena.in/guides-tutorials/1209507.htm
 +
==tar and gzip==
 +
<pre>Archive a set of files:
 +
 +
tar -cvf tarfile.tar /var/log/syslog /var/log/messages
 +
 +
Archive and compress (gzip) a set of files:
 +
 +
tar -cvzf file.tar.gz /var/log/syslog /var/log/messages
 +
 +
Archive and compress (bzip2) a set of files:
 +
 +
tar -cvjf file.tar.bz2 /var/log/syslog /var/log/messages
 +
 +
Extract a tar file:
 +
 +
tar -xvf file.tar
 +
tar -xvzf file.tar.gz
 +
tar -xvjf file.tar.bz2
 +
 +
Display the content of a tar file:
 +
 +
tar -tvf file.tar
 +
tar -tvzf file.tar.gz
 +
tar -tvjf file.tar.bz2
 +
 +
Replace a file in an existing tar file:
 +
 +
tar -rvf tarfile.tar filetoreplace
 +
 +
Update a file in an existing tar file:
 +
 +
tar -uvf tarfile.tar newfile
 +
 +
Copy all files in one directory to another directory on local host:
 +
 +
cd /etc; tar cf – . | (cd /etc.bak; tar xvpf -)
 +
</pre>

Revision as of 07:08, 20 February 2012

How to Install SVN on Ubuntu

http://www.howtogeek.com/howto/ubuntu/install-subversion-with-web-access-on-ubuntu/
http://forums.techarena.in/guides-tutorials/1209507.htm

tar and gzip

Archive a set of files:

tar -cvf tarfile.tar /var/log/syslog /var/log/messages

Archive and compress (gzip) a set of files:

tar -cvzf file.tar.gz /var/log/syslog /var/log/messages

Archive and compress (bzip2) a set of files:

tar -cvjf file.tar.bz2 /var/log/syslog /var/log/messages

Extract a tar file:

tar -xvf file.tar
tar -xvzf file.tar.gz
tar -xvjf file.tar.bz2

Display the content of a tar file:

tar -tvf file.tar
tar -tvzf file.tar.gz
tar -tvjf file.tar.bz2

Replace a file in an existing tar file:

tar -rvf tarfile.tar filetoreplace

Update a file in an existing tar file:

tar -uvf tarfile.tar newfile

Copy all files in one directory to another directory on local host:

cd /etc; tar cf – . | (cd /etc.bak; tar xvpf -)