TechTalkz.com Logo

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Operating Systems > Open Source & Linux

Notices

Linux Commands (Based on Debian)

Open Source & Linux


Reply
 
Thread Tools Display Modes
Old 07-05-2009, 01:16 AM   #1
Senior Member (500+)
 
Hatrix's Avatar
 
Join Date: Jan 2007
Location: Tunisia
Posts: 929
Thanks: 49
Thanked 55 Times in 51 Posts
Rep Power: 22 Hatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud ofHatrix has much to be proud of


OS: Windows 98 / Windows ME Windows XP


Send a message via MSN to Hatrix Send a message via Yahoo to Hatrix
Post Linux Commands (Based on Debian)

Well here is a list tht i wrote for most important command using Debian to use them and test them!

echo [text] : write text in console
man [command] : Help
cd .. : go to parent directory
cd [directory] : go to /
ls : show all files and folders in the current directory
ls [directory]: show all files and folders in the selected directory
ls -l : how all files and folders in the current Directory with details (size,date of creation...)
ls -a : how all files and folders plus hidden files and folders in the current Directory
ls -r : how all files and folders in the current directory ans sub-directories
mkdir [name] : create new folder
rmdir [name] : Delete an empty folder
cp [name] : copy file or empty folder
cp -i : copy with confirmation
cp -r : copy none empty folder
cp -f : forced copy (auto overwrite if already exist)
scp user@server : copy a file or folder from an other computer
ssh user@server : secured connection with an other computer
ftp : ftp connection
telne t : telnet connection
pwd : shows current directory
rm : delete a file or folder
rm -f : forced delete
rm -i : none forced delete (requires comfirmation)
rm -r : delete a none empty folder
who : shows connected users
mv [source] [destination] : move a file or folder
mv [file name] [new name] : rename a file or folder
gzip : compress to .gz
gzip -d : decompress a .gz
gzip -r : compress a none empty folder
lpr : print
lpr -P : choose printer
lpr -# : #= number of copies
lpq : show waiting queu
tar -c : compress to .tar
tar -u : update archive
tar -x : extract
tar -z : compress to .tar.gz .tgz
tar -v : view files in an archive
alias [command] [shortcut] : creat a shortcut for a command (eg. alias tar -cv comp) here comp is a new comand that has the same function as tar -cv
unalias : delete a shortcut
wc : shows size, number of lines and number of words in a file
wc -c : shows only size
wc -w : shows only number of words
wc -l : shows only number of lines
history : shows history of executed executables
history [#] : shows # last executed executables
wich [file name] : shows file's full directory
find -name : search by name
find "*.pdf": search by extention
locate : search by a string
grep : view and edit text files
mount : attach a partition to a directory (eg. CD-ROM , NFS)
unmount : delete attachement
cat> : create and write a file (press Ctrl+D to close file and save!)
cat>[name file1]>[name file2]>[name file3] : create more then 1 file in the same directory
file : shows if the file is binary or source
split : cut the file in many pieces
sort : sort in files
sort -r : invert file sort
sort -n : sort by numbers
sort -t # : # is the separator btw diffrent cells
sort -d : sort by aracters (from a to z)
tr : convert char
tr " :""#" : replace separator ":" by "#"
tail : get the tail of the file
tail +10 : shows from the 10th to the last line of a file
tail -10 : shows the last 10 lines
tail -c -10 : shows the last 10 caracters
head +10 : shows from the 10th to the first line
head -10 : shows from the first to the 10th line
cut : modify a text cell
cut -c -# : cut the first # caracters of a file
cut -c #- : cut from the #th caracter to the last caracter
cut -f -# : cut the first # text cells
cut -d x : x is the seperator btw diffrent cells
paste : fusion of cells, (add a new column)
paste -s : convert lines to columns and the opposite
diff : shows diffrence btw 2 files (line x, char yy)
comm : shows intersection of 2 files

__________________________________________________ ___
VARS

X? = X or 0
X* = 0 or n times X
X+ = 1 or n times X
X|Y = X or Y
[..] = char
X{n} = {X,X,..,n}
X{n,} = {X,X,..,n,n+1,...}
X{n,m} = btw {X,X,..,n} and {X,X,..,m}
abc$ = shows result in the last line
^abc = shows result in the beginning of the line
<abc = search for words beginning with abc
abc> = search for words finishing with abc

__________________________________________________ ___
Directories

dev/sda = HD SCSI
dev/hda = HD IDE
/ = racine
/root = root directory
/boot = vmlinuz core and boot files
/dev = special files
/etc = system configuration files
/bin = executable files
/home = users directory (like c:\documents and settings\ in windows)
/var = database of variables
/tmp = temporary files
/usr = shared programs

__________________________________________________ ___
METACARACTERS

* = 1 or more character
? = 1 character
[] = word
[aA]* = words beginning with a or A
[a-d]* = words beginning with a , b , c and d



Important: every file beginning with "." is a hidden file!
__________________
Mawarebytes
Ccleaner
KillBox
Hatrix is offline   Reply With Quote
Reply

Thread Tools
Display Modes



< Windows Help - MS Office Help - Hardware Support >


New To Site? Need Help?

All times are GMT +5.5. The time now is 08:21 AM.


vBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2009, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional