Tuesday, December 4, 2007

A few linux commands

It's a slow day today. So I'm going to share some very helpful linux commands. These commands are what I always use every time I work since I log in through the server using ssh. This is just an overview of the basic commands. I might discuss later the advance use of each command.

  1. ls - show files and subdirectories under the current directory.

  2. pwd - shows current directory you are

  3. cd - change directory.
    • to go to the parent directory type "cd .." without the quotes
    • to go into a subdirectory, type "cd yoursubdirectoryname" without the quotes

  4. cp - copies a file or a directory.
    • to copy a file, type "cp originaldirectory/originalfile destination/newfile" without the quotes
    • to copy a directory just add -r like "cp -r originaldirectory destination" without the quotes.

  5. rm - removes a file or directory
    • to remove a file, type "rm filename" without the quotes
    • to remove a directory, type "rm -rf direc" without the quotes

  6. vi - opens a powerful text editor. I use this every time.
This is it for now. I will add more later on about connecting to another server using ssh, etc. I hope these are helpful.

No comments: