Shell Commands: Difference between revisions
Jump to navigation
Jump to search
m →vi |
m →find |
||
Line 33: | Line 33: | ||
<code>ifconfig</code> | <code>ifconfig</code> | ||
== | == Searching == | ||
To find path to a file run: | To find path to a file run: | ||
Line 39: | Line 39: | ||
<code># find / -name "filename"</code> | <code># find / -name "filename"</code> | ||
To find an expression within a file: | |||
[http://www.64bitjungle.com/ubuntu/search-file-contents-in-multiple-directories-with-recursive-grep/ tips using grep] | |||
== Tips == | == Tips == |
Revision as of 14:06, 16 July 2010
vi
Tape Archival (tar)
Create tar
tar -cvf filename.tar filemane
Undo tar
tar -xvf filename.tar
List contents tar
tar -tvf filename.tar
gzip
Compress file
gzip -9 filename
Decompress file
gzip -d filename
ifconfig
To determine your IP address settings run:
ifconfig
Searching
To find path to a file run:
# find / -name "filename"
To find an expression within a file:
Tips
Find version of OS
cat /etc/redhat-release
cat /etc/redhat-release
cat /etc/fedora-release
cat /etc/SuSE-release
Password protect with Apache
Password protect your pages with htaccess