LINUX Linux is a Unix-like operating system that was designed to provide personal computer users a free or very low-cost operating system comparable to traditional and usually more expensive Unix systems.
<ul><ul><ul><li>Linux has a reputation as a very efficient and fast-performing system.
Linux was developed by Linux Torvalds at the University of Helsinki in Finland.He started his work in 1991. </li></ul></ul></ul>
<ul><ul><li>The effort expanded with volunteers contributing code and documentation over the internet.
It is currently developed under the GNU public license and is freely available in source and binary form. </li></ul></ul>
LINUX COMMANDS 1) cd -“Change Directory”. <ul>2) trap -Used to trap one or more signals and then decide action. 3) pwd -“Print Working Directory”. Shows the current location in the directory tree. </ul>
4) ls - List all files in the current directory, in column format. 5) clear -Clear the terminal screen. 6) touch -Create empty file of zero byte. 7) rm -Delete a file. 8) which -Shows the full path of shell commands found in our path.
9) locate - A quick way to search for files anywhere on the filesystem. 10) ps -Lists currently running process (programs). 11) w -Show who is logged on and what they are doing.
12) File - Knowing the File Type. 13) chown -Changing owner of a file. 14) unmask -Default file permission. 15) split -Split files Horizontally. 16) df - Report filesystem disk space usage. 17) id - Print your user-id and group id's
18) spell -displays a list of misspelled words. 19) ispell -Interactive spell-check program. 20) move -used to view the contents of the file page by page. 21) echo -Display text on the screen.
22) date -date to set your server's date and time 23) finger -Use finger to see who's on the system 24) cal -displays a calendar 25) mv -Move or rename files 26) shutdown -Shuts the system down.
27) whereis -Show where the binary, source and manual page files are for a command 28) who - show who is logged on 29) which -Find Command path 30) chmod -change file permissions
Every other file and directory on your system is under the root directory.
Usually the root directory contains only subdirectories. </li></ul>
< /boot > The place where Linux keeps information that it needs when booting up. < /bin > The /bin directory contains the most important programs that the system needs to operate, such as the shells, ls, grep, and other essential things.
< /lib > The shared libraries for programs that are dynamically linked. < /sbin, /usr/sbin > Most system administration programs are stored in these directories.
< /mnt > <ul><li>This directory is used for mount points.
The different physical storage devices must be attached to some directory in the file system tree before they can be accessed.
This attaching is called mounting, and the directory where the device is attached is called the mount point . </li></ul>
< /usr > Contains user applications. /usr is the largest directory on a Linux system. </usr/share> Config files and graphics for many user apps. < /usr/local > This is where you install apps and other files for use on the local machine.
< /var > <ul><li>It variable data that changes constantly when the system is running.
</var/spool> - This directory holds files that are queued for some process, like printing. </li></ul>
ed - Original UNIX line-based editor, useful in scripts emacs - GNU editor and fully integrated user environment ex - Powerful line-based editor (integrated with vi) Editors
gawk - GNU awk, powerful text editor for records containing fields sed - Stream-oriented (non-interactive) line-based editor vi - Classic screen-based editor for UNIX vim - Vi IMproved, enhanced support for programmers
a,A – Apendition </li></ul></ul></ul></ul></ul></ul></ul></ul></ul></ul>(read as Orissa) The control can be brought back to the command mode by using <Esc> key. o,O,r,R,i,I,s,S,a,A
The ex-mode: <ul><li>Also known as last-line mode and allows the user to use the commands in the bottom of the vi screen.
In fact last line is called as command line . </li></ul>
<ul><li>User can get into ex mode from command mode by typing (:) character.
User can get back to the command mode from ex mode by using Enter key.
The control can be brought back to the command mode from input mode by using <Esc> key. </li></ul>
The actual editing is done in vi editor in the buffer called editor buffer . Following cmds are used to quit from vi editor: 1. zz -last command.Saves the file in change mode and then quits. 2. :w -Just saves or writes the buffer contents on to disk file and remains in cmd mode. Quitting the vi Editor
3. :x -Saves the file in change mode and then quits. 4. :wq - write and quit.Behaves exactly like :x. 5. :q -Quits the vi environment --if change made in editor is already written. --if changes made is not written or saved.It will give suitable message. 6. :q! -Quits the vi env without saving the buffer contents even changes are made.
MOVING THE CURSOR 1 .Moving by One Position: I j Backspace Moves cursor by one character position left. Moves cursor up one line from its present position in same column. Moves cursor down one line from its present position in same column. Spacebar Moves cursor by one character position right. k h
Moving the cursor: $(dollar) - Moves to the end of the Current line 0(zero) - Moves to the beginning of the Current line. ^(caret) - Moves to the first non-blank character at the beginning of the Current line
H(High) - Moves to beginning of Top line of current screen. L(Low) - Moves to beginning of last line of current screen. M(Middle) -Moves to beginning of Middle line of current screen.
*Audacity: Audacity is a free, easy-to-use audio editor and recorder for Windows,Mac OS X, GNU/Linux and other operating systems. *Grip: A cd-player and cd-ripper for Gnome desktop. APPLICATIONS
*Inkscape: An Open Source vector graphics editor similar to Illustrator, CorelDraw using the W3C standard Scalable Vector Graphics (SVG) file format. *Ardour: U sed to to record, edit and mix multi-track audio.
Cron Tab and Cron Job <ul><ul><li>The Cron, at, batch Command is used for Scheduling Execution of Command according to requirements.
The term cron is derived from the word chronograph.
Cron is a system deamon that keeps sleeping most of the time. </li></ul></ul>
<ul><ul><li>It typically wakes up every one minute and checks it crontab file for any jobs to be executed during this minute.
All users have a crontab file of his or her own.
The name of this crontab file will be the user's login name. </li></ul></ul>
<ul><li>Scheduled jobs will be present in crontab file.
A crontab may contain one or more files,each corresponding to a command that is to be executed periodically at a specific day, date and time. </li></ul>
Minute (0-59) Command to be executed day of week (0-6) 0 being sunday month(1-12) day of month (1-31) Hour (24-h format) Syntax of a crontab line Every line is made up of six fields seperated by a Blank .
<ul><li>In crontab line, an asterisk (*) represents all possible values.
For example, if a * character appears in the fifth field, then the command mentioned in the line will be executed on all days of the week at the specified time. </li></ul>
<ul><li>No spaces will be allowed within a field.
If neccessary group of numbers can be specified within a single field seperated by commas. </li></ul>
Below are two typical crontab lines. 1. 0 0 * * * backup.sh When executed, the above line runs the backup.sh script at midnight everyday .
2. 00,30 09-17 * * 1-5 mail.sh When execute, the above lines runs the mail.sh script on all weekdays-Monday to Friday every half hour between 9 and 17 hours
<ul><li>When more than one command is executed,
every cmd has to be written in a seperate line having the above format in a seperate file.
Then it is submitted to crontab command, as shown below, where cmdfile is the name of the file executed periodically. </li></ul>$crontab cmdfile
Who can use cron facilities: <ul><li>Only System administrators are permitted to use.
However, in certain cases,certain users are permitted to use.
The username of those users will be in a file named cron.allow. </li></ul>
<ul><li>And cron.deny -contains name of user to whom respective facilities are denied.
Obviously system administrator maintains all these files. </li></ul>