Quick list of unix shell commands

Friday, March 20th, 2009
Advertisement

Subscribe.
Enter your email:

Some Unix or Linux shell commands.

  1. Cancel a command
    Ctrl+U, Ctrl+X, or @
  2. Change the working directory to /usr
    cd /usr
  3. Change the working directory back to your home directory
    cd
  4. Copy a file
    cp oldfile newfile
  5. Copy a file to another directory
    cp oldfile dirname
  6. Copy a bunch of files (e.g. filename1, filename2, …) to another directory
    cp filename* dirname
  7. Copy all the files in this directory and in all its subdirectories
    cp -r * newdir
  8. Erase a file
    rm filename
  9. Rename a file
    mv oldname newname
  10. Move a file to another directory
    mv oldfile dirname
  11. List filenames
    ls
  12. List filenames with sizes and dates
    ls -l
  13. List hidden files too
    ls -al
  14. List files and pause when screen is full
    ls | more
  15. Look at a text file
    cat filename
  16. Look at a long text file
    more filename
  17. Make a new link (name) for a file
    ln oldname newname
  18. Make new links (names) for files in a directory
    ln dirname/* newdir
  19. Combine two files
    cat file1 file2 > newfile
  20. Compare two files
    diff file1 file2
  21. Look at the manual page for the ls command
    man ls
  22. Change your password
    passwd
If you are new here, you might want to subscribe to the RSS feed or newsletter.

Enter your email address:

Creates the exact copy of your hard disk and allows you to instantly restore the entire machine.
New Acronis True Image Home 2010 is the most reliable and easy in use backup solution. Now with online backup option!
15% Discount Code: FMAATIH2010

What else?

Like this article? Share it

 Digg  del.icio.us  TwitThis  Facebook  Reddit  StumbleUpon

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>