Here i am going to explain the regular process of basic linux commands used in Corporate companies
Navigation :
To print working directory :  pwd
To change directory            :  cd
To list files and contents of directories :  ls
To list files/direc in long format : ls –l
To list the hidden files/direc : ls –a
To view text files : less  text_file
To know what kind of a file it is : file name_of_file
Manipulating Files:
To Copy files and directories :   cp file1 filenew
To move or rename the files/directories : mv  file1  filenew
To remove the file/directories :   rm file
To make directory : mkdir

Working with commands:
Display Information about command type: type  command(ls,cp..etc)
 To locate the command : which command (ls…etc)
To display the reference page: help –m  command(cd..etc)
To display on-line command interface : man ls

I/O Redirection :
To redirect standard output to a file   : “ > “    ( ls  >  file_list.txt )
To redirect standard output to a file   : “ < ”    (sort <  file_list.txt > sorted_file.txt)
With pipeline the output of one command is fed into input of another :
             ls –l | less   
  rpm –qa| grep –i filename :   Rpm –qa  list  for all rpm files installed on system and  Grep Accweb  it  find any containing the string “accweb” and output them.

Filters:
sort : Sorts standard input then outputs the sorted result on standard output.
grep : Examines each line of data it receives from standard input and outputs every line that contains a specified pattern of characters.
tail : Outputs the last few lines of its input. (Ex : tail –f logs.txt)
Permissions:
to change the permissions of folders/files : Chmod  XXX filename
Temporarily become super user : su & sudo
Change file ownership of user :  chown  user filename
Change file ownership of group : chgrp  group filename
Change file ownership of user & group : chown  user:group filename

Job Control:

To know the process running  ps  or jobs
to know the processes running on system   : Ps  aux
to find process with user  :           Ps  –u  name of User
to kill the process   : Kill -9  process name
 -9   Kill signal
-1   hang-up signal
-2 interrupt signal
-15 termination signal


Wildcards:
Matches any characters  :  *
Matches ant single character:  ?
All filenames  :  *
All filenames that begin with the character "g" :  g*
All filenames that begin with the character "b" and end with the characters ".txt" : b*.txt


Txt Editor:

 to edit the configuration/txt  file (command line)  : vi/vim 
 gedit is the editor supplied  (GUI)  : gedit
Searching:
Search  file by name  Find -name "query"
Search file by type   Find  -type  type_descriptor_query
                 Type decriptor :
F -  regular file
d- directory
I -symbolic link
Search  :  locate filename
We can use  locate/grep for searching :
grep  "codes"  install.log   : searh for word/string/line  in a file   (grep –n ,display with line number, grep –I it search for case sensitive )
grep -i  "codes"(Search string)   /root/install.log (path of file)
[root@localhost ~]# grep "codes" install.log
Installing iso-codes-3.16-2.el6.noarch

Remote Administration :
Can use ssh with a full hostname to connect to a remote machine : ssh hostname
Connect to a remote system with your current username :ssh username@hostname
Allows you to copy files from one computer/server to another computer/server : scp

Other Commands:
To know which user is logged : whoami
To know who recently  logged : users

history : for monitoring commands executed by user.
   Service :  for  start/stop/restart/status (Service httpd start,service red5 stop,…etc)
Top : to monitor system activities
df    - to know disk file space on machine (df –h  size in GB,df –m  sizein MB )
fdisk –l  - to  display with partitions
Netstat : give information about network connections (nestat –tcp  display all tcp connections)
Mount – for mounting formatted partitions

Basic Network Commands :   

Netstat :   to look up the various active connections within a computer
Traceroute : to know the number hop it travelled to reach destination.
Nslookup:   It is use for DNS quiery.
Dig : It is use for DNS quiery.It display full info.
Ifconfig  :  It is very useful in determining what could be wrong with a network.to know IP address.
Ifup:  enable interface
Ifdown : disable interface.
Ping :  PING is used to check for a response from another computer on the network.
Ping  -c: Host address

What command used to check Disk Space ?

1 Command to know disk space  :  df                
2 Command to know size in GB  :  df -h
3 Command to know size in MB  : df -m

How to change the Ownership of file/Group?

ls -lart tmpfile
-rw-r--r-- 1 himanshu family 0 2012-05-22 20:03 tmpfile

Before using command :

Command to change Ownership of file:  chown  root  tmpfile

Command to change Ownership of group : chgrp  friends tmpfile


After using command above:
ls -l tmpfile
-rw-r--r-- 1 root friends 0 2012-05-22 20:03 tmpfile



What command used for finding the process running?

Command to see processes running   :  ps
Command to find the process run by user :  ps -u  Sukesh

What  Command to kill a process ?
                            Kill -9    process name

-9   Kill signal
-1   hangup signal
-2  interrupt signal
-15  termination signal

Search for a file by name ?

Find -name "query"

Search the file by type?

Find -type type_descriptor query

Type decriptor :
F -  regular file
d- directory
I -symbolic link


How  to know which user is logged?

Command :   whoami

Who recently  logged in?

Command  : users

How do we transfer file from one server to another?

          Command used  to establish ssh connection :   ssh  username@ IP

How we move file from one folder to another?

                            Command :       Mv   file name   remote folder path

How do we copy file from one folder to another folder?

                            Command:      cp  filename  remote folder path

What command use for add interface?

                  Command :            ifup
What command used fo remove interface?

                  Command :      ifdown

To know Current working Directory ?

Command used  : Pwd

Command to give permissions?

Chmod XXX  filename

777   rwx rwx rwxpermissions diagram

rwx = 111 in binary = 7
rw- = 110 in binary = 6
r-x = 101 in binary = 5
r-- = 100 in binary = 4

Chmod 777 filename