Shell Commands: Difference between revisions

From GotOpinion
Jump to navigation Jump to search
Line 33: Line 33:
<code>ifconfig</code>
<code>ifconfig</code>


== find ==
== 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

vi text editor

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 using grep

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

Users and Groups

Users

Permissions

Linux