Wednesday 29 February 2012

Linux Basic Command

Linux Basic Command
  1. touch: Create new file.
  2. rm: Remove specified file.
  3. whereis: Locate binary, source and manual sections for specified files.
  4. which: Show the full path of commands.
  5. type: Declare variables and/or give them attributes.
  6. grep: Print lines matching a pattern.
  7. cp: Copy files and directories.
  8. mv: Move or rename files.
  9. rmdir: Remove directories.
  10. whoami: Print effective user id.
  11. locate: List files in database that match a pattern.
  12. find: Search files in a directory hierarchy.
Viewing File Commands 
  1. cat: Acronym for concatenate. It display the contents of a file.
  2. less: Display output one screen at a time.
  3. head: Print the first part of the files.
 Managing files and directories command 
  1. man: Give information about any command.
  2. echo: Display message on screen. Useful for showing the values of environmental variables.
  3. pwd: Stands for print working directory. Allows you to know the directory which you're located.
  4. ls: Print all the files in current directory.
  5. usermod: Modify user account information.
  6. cd: Change directory.
  7. info: Provide current information.
File Permissions
  1. r - Read permission, view what in the file.
  2. w - Write Permission, change the file content.
  3. x - Execute Permission, run the file as a program.
Change File Ownership
  1. chmod: Change file permission
  2. chgrp: Change group ownership
  3. chown: Change user ownership

No comments:

Post a Comment