LINUX commands usage with examples

Clear the screen —clear

Login as superuser:—-sudo -s

ls List Command

  • view hidden files—ls -l -a

cp Copy Command

  • Copy single file
    • Command  $ cp addresssOfFileToBeCopied locationOfFolderWhereFileToBeCopied
    • Example:   $ cp home/sudeep/Desktop/configuration.php /opt/lampp/htdocs/joomla/
  • Copy compete directory
    • Command $ cp -r addressOfFolderTobecopied/* locationOfFolderWhereFolderToBeCopied
    • Example   $ cp -r /home/hope/files/* /home/hope/backup

chmod Change permissions

  • Change permissions of complete folder along with the files and folders within the folders
    • Command $chmod 777 -R directoryNameOrPath/
    • Example    $chmod 755 -R home/sudeep/Desktop/joomla/

tar -xvzf extract files

  • extarct the tar files to the specific location
    • Command $tar -xvzf file.tar.gz -C locationWhereFileToBeExtracted
    • Example   $tar -xvzf DBDesigner4.0.5.4.tar.gz -C /home/sudeep/Desktop/ise/

find Command to search a file or folder

  • to search any file or folder in the complete linux file system
    • Command $find / -name fileOrfolderNameToBeSearched
    • Example   $find / -name config.php
  • to search any file or folder at specific location  linux file system
    • Command $find locationWhereYouWantToSearch -name fileOrfolderNameToBeSearched
    • Example   $find /home/sudeep/Desktop/ -name original
Advertisements

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s