Whether your UNIX uses a Bourne-style shell or the C shell, you can do some simple typing to execute a range of commands. The following list shows a list of commands and what to type to execute them:
To Do This | Type This | To Do This | Type This |
---|---|---|---|
Cancel a command | Ctrl+U, Ctrl+X, or @ | List filenames with sizes and dates | ls -l |
Change the working directory to /usr | cd/ usr | List hidden files too | ls -al |
Change the working directory back to your home directory | cd | List files and pause when screen is full | ls | more |
Copy a file | cp oldfile newfile | Look at a text file | cat letter |
Copy a file to another directory | cp oldfile dirname | Look at a long text file | more letter |
Copy a bunch of files to another directory | cp budget* dirname | Make a new link (name) for a file | ln oldname newname |
Copy all the files in this directory and in all its subdirectories | cp -r * newdir | Make new links (names) for files in a directory | ln dirname/* newdir |
Erase a file | rm junkfile | Combine two files | cat file1 file2 > newfile |
Rename a file | mv oldname newname | Compare two files | diff file1 file2 |
Move a file to another directory | mv oldfile dirname | Look at the manual page for the ls command | man ls |
List filenames | ls | Change your password | passwd |
dummies
Source:http://www.dummies.com/how-to/content/unix-shell-commands.html
No comments:
Post a Comment