Linux beginners

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