Difference between revisions of "Linux Administration"

From Hawk Wiki
Jump to: navigation, search
(Search specific text among files)
(SVN cheat sheet)
Line 45: Line 45:
 
</pre>
 
</pre>
 
==SVN cheat sheet==
 
==SVN cheat sheet==
http://www.abbeyworkshop.com/howto/misc/svn01/
+
[[http://www.abbeyworkshop.com/howto/misc/svn01/]]<br>
 +
Set up svn in Ubuntu<br>
 +
[[http://www.howtogeek.com/howto/ubuntu/install-subversion-with-web-access-on-ubuntu/]]<br>

Revision as of 21:32, 20 June 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 -)

Search specific text among files

grep -H "textToFind" /var/www/*
grep -H "textToFind" /var/www/sites/*/html/.htaccess

SVN cheat sheet

[[1]]
Set up svn in Ubuntu
[[2]]