A shell is a command interpreter. A shell is an entity that takes input from the user and deals with the computer instead of the user dealing directly with the computer.Unix Shell is a program that allows the user to use the computer without him having to deal directly with it. It is in a sense a protective shell that prevents the user and computer from coming into contact with each other.
Unix Shell has been constantly changing its version such as SUNOS, HPUX, BSD and Solaris, just to name a few. Each of these Unix types will have small variations from all of the others. By the way, the true is that each version of Unix has more in common with all of the others than differences. The
ls, for example, will give a listing of the current directory in any Unix environment. The changes or semantics local to any particular brand of Unix should be explained in the pages that come with that particular system.
The ls is a command used to list all the non-hidden files in the current directory meanwhile the ls-a is used to list hidden files.
The -l option is used to list more details on each file in the directory. Also lists the permissions, size and the last modified dates of the files.
The cd is used to change from one directory to another
The ‘cp’ command to copy single, multiple files or directories as well.
To copy a single file ‘abc’ to ‘def’
The rm command is used to delete files. Remember that there is no undelete in Linux. So be sure before you delete files or directories.
The –rf to delete a directory and all the files in it. Remember, this command is potent, and not reversible. Be careful before use it.
The mkdir to create a new directory
The rmdir command for deleting files and directories
The pwd to know where you are in the directory structure
The cat command is one of the most versatile tools available to read and write into files.
The def prints the contents of the file.
If you use the cat command, followed by >, it will empty the file and insert the fresh content into it.
The Cat is to add the contents of one file, abc into another file, def, all you need to do is
The tail to output the last part
The f-option in order to keep checking the updates to a file.
The grep, fgrep for searching for words or patterns in a file or files is child’s play in Linux.
Use the grep command to also search command outputs.
In order to set the date, use the -s option.
The man is used if you have trouble figuring out any command, all you need to do is use the man command. This is the F1 or Help of Linux.
For example: man grep
The ping If you are in a network and you need to check Network or Internet connectivity