Unix is an operating system, which comes in different varieties such as MacOS X and Fedora Linux to name a couple.
The kernel in Unix allocates time and memory to programs. It also handles where files are stores and the communications which take place across the system.
The shell in an interface between the user and kernel, sometimes refered to as the terminal.
For example if a user typed in rm <file-name>
, the shell would search the system for the file name containing rm and makes a request to the kernel through a system call to execute the command.
ls
View files in current directory
ls -R
View all files and files within subdirectories
ls -a
This will show you all hidden files in the directory
cat
Create new text file
cat <file-name>
Create a new text file with a given name
cat <file-one> <file-two> > <new-file-name>
Combine two files
rm <file-name>
Remove a file
mv <file-name> location-name
Move a file to a new location
mv <file-name> new-file-name
Rename a file
sudo <your-command>
Run program with security privileges of superuser/root
mkdir <directory-name>
Create a directory
mkdir /user/<directory-name>
Create a directory with a given path
rmdir <directory-name>
Remove a directory
mv <directory-one> new-directory-name
Rename a directory
clear
This will clear the console