Shell Commands: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
== Script command sessions == | |||
To log your terminal sessions used <code>script</code> command: | |||
<pre> | |||
$script /tmp/terminal.log | |||
</pre> | |||
CTRL+D to end script logging. | |||
Courtesy of [http://www.unixtutorial.org/2007/11/script-save-your-session-log/ Unix Tutorial site] | |||
== vi == | == vi == | ||
Revision as of 01:32, 29 August 2010
Script command sessions
To log your terminal sessions used script
command:
$script /tmp/terminal.log
CTRL+D to end script logging.
Courtesy of Unix Tutorial site
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:
List open files
For example:
lsof -i tcp:80
Customize BASH prompt
Customize your bash prompt basics
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