What is SHELL ??
The SHELL used to be the only user interface available on a UNIX computer.
It is a UNIX term used to describe the user interface with an operationg system.
We can also call the SHELL a command interpreter because bassicaly it can understand and execute the commands that the user enters.
Basic Commands
- cat - Show a file.
cat file1 : list file1 to screen cat file1 file2 > files : add all files together into files cat *.txt > files : add all .txt files together cat file1 file2 | grep fred : pipe files
- cd - Change current directory
cd : go to home directory
cd ~/documents : go to /home/user/documents
cd ~firstname : go to /home/firstname
cd dir : go to directory (relative)
cd /dir1/dir2... : go to directory (absolute)
cd - : go to the last directory
- cp - Copy file(s)
cp file1 file2 : copy file1 to file2 cp file1 directory : copy file1 into directory cp file1 file2 ... directory : copy files into directory cp -R dir1 dir2/ : copy dir1 into dir2 including subdirectries cp -pR dir1 dir2/ : copy directory, preserving permissions
- date - Shows current date
- dvips - : Convert a dvi file to PostScript
dvips document.dvi : convert document.dvi to document.ps dvips -Ppdf document.dvi : convert to ps, for conversion to pdf
- file - Gives you the type of the file and some other details
- grep - Look for text in files.
grep "hello world" file1 file2 ... : look for 'hello world' in files grep -i "hello world" filename : ignore capitals in search cat filename | grep "hello world" : use pipe grep -v "hello" filename : list lines that do not include hello
- gtar - GNU version of the tar utility. It allows to put files together in one archive file.
gtar cf desq.tar dir1 : put contents of directory into desq.tar gtar czf out.tar.gz dir1 : write compressed tar, out.tar.gz gtar xf by.tar : extract contents of by.tar here gtar xzf by.tar.gz : extract compressed by.tar.gz gtar xf by.tar file.txt : extract file.txt from by.tar
- gzip / gunzip - GNU Compress files into a smaller space, or decompress .Z or .gz files.
gzip file.fits : compresses file.fits into file.fits.gz gunzip file.fits.gz : recovers original file.fits gzip *.dat : compresses all .dat files into .dat.gz gunzip *.dat.gz : decompresses all .dat.gz files into .dat program | gzip > out.gz : compresses program output into out.gz program | gunzip > out : decompresses compressed program output
info gtar - documentation for gtar
- latex - Convert a text file to dvi
- logout/exit : Closes the current shell.
- ls - Show lists of files or information on the files
ls file : shows if the file exists ls -l file : information about the file ls *.txt : show files .txt ls -lt : show information about files in date order ls -lrt : above reversed in order ls -a : show all files and all the hidden files ls dir : show contents of directory ls -d dir : shows if the directory exists ls -p : adds meaning characters to ends of filenames ls -R : show files also in subdirectories of directory ls -1 : show one file per line
- man - Get instructions for a particular Unix command .
man man : get help on man man grep : get help on grep man -s1 sort : show documentation on sort in section 1
- more - Show a file one screen at a time
more file : show file one screen at a time grep 'frog' file | more : Do it to output of other command
- mv - Move file(s) or rename a file
mv file1 file2 : rename file1 to file2 mv dir1 dir2 : rename directory dir1 to dir2 mv file1 file2 ... directory : move files into directory
- openoffice.org - a free office.
- passwd - change password
- pwd - Show current directory
- quota - Shows you how much disk space you have left
- rm - Delete files
rm file1 : delete a file rm -r dir1 : delete a directory and everything in it
- rmdir - Delete a directory
rmdir dirname (id it's empty) rm -r dirname (if it's not empty)
- thunderbird - Start mozilla thunderbird.
I hope this
article was helpful and for any suggestions leave a comment bellow
0 commentaires:
Post a Comment