Updated September 07, 2004
Created June 11, 2004


Autogenerated Site Map
Search this Site!:
Search this site powered by FreeFind

ls, mv, cp,

cat, head, tail, grep, diff, wc, sed, awk, file, strings, tac, more, less

find, slocate,

tar, cpio, gzip, gunzip, zcat

df, du,

ps, kill, killall, service, /etc/init.d/*, /etc/xinetd.d/*,

free,

top, watch,

vi,

chown, chgrp, chmod,

ifconfig, netstat, ssh, rsh, telnet, rsync,

for, while, read, history,

Advanced: expect, script, tee, nohup

mkisofs, cdrecord,

ps2pdf

jpegtran

date, cal

dmesg, /var/log/messages

chkconfig

iptables, ipchains, gShield,

seq

printf


File Permissions
I/O Redirection
Pipes
Regular Expressions
Absolute and Relative Paths
Loop Devices
Device Nodes
Job Control

ls -ltr [long, sort by time, reverse sort order]
ls -ltra [a = show hidden files -- they have a leading dot]
mv -i [interactive, prompt before overwriting]
cp -ai [interactive, prompt before overwriting, a = archive to keep date and time stamps]
cat [concatenate files and print on standard out]
cat -n [add numbers to the lines]
head -5
tail -2
grep mystring
grep -i mystring
grep [0-9]
grep ^mystring
grep mystring$
diff -Naur
diff -Naurq
diff -Naurb
wc
wc -l
sed -e 's/Search String/Replace String/'
sed -e 's/Search String/Replace String/g'
sed --silent 1,2p myfile.txt
sed 1,2d myfile.txt
sed -e 's,\(match\)\(this\),\2\1,'
ps aux | awk '{print $2}'
file unknownfile.abc
strings myfile.txt | grep -i SearchString
cat myfile.txt
tac myfile.txt
more myfile.txt
cat myfile.txt | more
less myfile.txt
cat myfile.txt | less
find .
find . -type f
find . -type d
find . -type f -exec grep -Hi {} \;
slocate -u
slocate FileName
slocate -i FileName
tar -cf newfile.tar .
tar -czf newfile.tar.gz .
tar -czf newfile.tgz .
tar -cf newfile.tar file1 file2 file3 dir1/ file4
tar -czf newfile.tar.gz file1 file2 file3 dir1/ file4
tar -czf newfile.tgz file1 file2 file3 dir1/ file4
mkdir unpack; cd unpack && tar -xvf ../tarfile.tar
mkdir unpack; cd unpack && tar -xzvf ../tarfile.tar.gz
mkdir unpack; cd unpack && tar -xzvf ../tarfile.tgz
find mydir/ | cpio -o -H crc > mystuff.cpio
find mydir/ | cpio -o -H crc | gzip -n9 > mystuff.cpio.gz
find mydir/ | cpio -o -H crc | gzip -n9 > mystuff.cgz
mkdir unpack; cd unpack && cat ../myfiles.cpio | cpio -idvm
gzip myfile.tar
gunzip myfile.tar.gz
zcat myfile.tar.gz > myfile.tar
df
df -h
df -h .
du -sh .
du -sh thisdir/
ps aux
ps waux
ps wfaux
ps wjfax
kill 37598
kill -9 37598
killall mozilla-bin
service cupsd start
service cupsd stop
service cupsd restart
service cupsd status
/etc/init.d/cupsd status
free -m
top
watch ls -ltr
watch -n0 ls -ltr
watch -n0 "ps aux | grep riblack | grep -v grep"

vi

Movement:
jkhl
wWbBeE
gg
G
:3
:15
CTRL+e
CTRL+y
CTRL+d
CTRL+u

Undo/Redo/Save/Abort/Exit
u
CTRL+r
:w
:q!
:q
:wq

Insert/Append/Copy/Paste
iIaAoO
yy
5yy
p
5p
P

Replace/Delete
r
R
dd
99dd
D

Searching
/SearchString
n
N
?SearchString
n
N

Visual Mode
v
SHIFT+v
CTRL+v

Vi Variables
:set ic
:set noic
:set nu
:set nonu

Swap case
~

chown riblack file1
chown riblack.riblack file1
chown -R riblack.riblack mydir/
chgrp riblack file1
chgrp riblack mydir/
chgrp -R riblack mydir/
chmod u+rwx file1
chmod g-x file1
chmod o=rx file1
chmod 0750 file1
chmod -R 0750 mydir/

ifconfig
ifconfig -a
ifconfig | grep inet
ifconfig eth0 192.168.0.44 up
ifconfig eth0 192.168.0.44 netmask 255.255.248.0 up

ifconfig mac setup.....

netstat
netstat -n
netstat -rn

ssh dest
ssh -C dest
ssh user@dest
ssh user@dest "tar -cf - myfile.txt" | tar -xvf -
tar -cf - file1 | ssh user@dest "tar -xvf -"
rsh dest
telnet
rsync -avx -e ssh localdir/ dest:/tmp/dropoff/
rsync -avx -e ssh dest:~/public_html/ 20040608/
rsync -avx -e ssh --link-dest=../20040607/ dest:~/public_html/ 20040608/

for X in 1 2 3; do echo $X; done
for IP in `cat iplist.txt`; do ssh $IP "rpm -hUv ftp://dest/pub/myrpm.rpm"; done
for IP in `cat iplist.txt`; do ssh $IP "rpm -hUv ftp://dest/pub/myrpm.rpm" & done
ps aux | while read COL1 COL2 COL3 COL4 AllOtherCols; do echo $COL1 $COL2; done

history | tail -10
history 5



seq 1 5
seq -f "%04g" 1 12




Search this Site!:
Search this site powered by FreeFind

Homepage: http://www.cpqlinux.com
Site Map: http://www.cpqlinux.com/sitemap.html