Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
labs:unix_basics [2012/01/03 16:51] – [Directory Access/Manipulation] admin | labs:unix_basics [2017/03/15 16:07] (current) – [Move or Rename Files] admin | ||
---|---|---|---|
Line 21: | Line 21: | ||
| '' | | '' | ||
| '' | | '' | ||
+ | |||
+ | Example: '' | ||
Line 28: | Line 30: | ||
==== Copy Files and Directories ==== | ==== Copy Files and Directories ==== | ||
- | * '' | + | To make a copy of a file ('' |
- | | + | |
+ | | ||
+ | |||
+ | For example | ||
+ | |||
+ | cp myfile.txt myfilecopy.txt | ||
+ | |||
+ | To copy a directory | ||
- | cp -r < | + | cp -r my_src_directory destination_directory |
==== Move or Rename Files ==== | ==== Move or Rename Files ==== | ||
- | * '' | + | Use the '' |
+ | * '' | ||
+ | |||
+ | If the destination is a directory, then the file(s) are moved into that directory. | ||
+ | |||
+ | For example, to rename '' | ||
+ | |||
+ | mv myfile.txt newname.txt | ||
==== Delete Files ==== | ==== Delete Files ==== | ||
- | * '' | + | * '' |
==== View contents of Files ==== | ==== View contents of Files ==== | ||
Line 81: | Line 97: | ||
===== Printing Files ===== | ===== Printing Files ===== | ||
- | To print from the command-line, | + | To print from the command-line, |
+ | |||
+ | | ||
+ | |||
+ | For example: | ||
lpr -Pcslab test.py | lpr -Pcslab test.py | ||
+ | | ||
+ | The printer name is '' | ||
+ | |||
+ | The command '' | ||
+ | |||
+ | |||
+ | ===== Creating Printable Files ===== | ||
+ | |||
+ | To create a condensed, printable file of your lab, use the '' | ||
+ | |||
+ | The syntax of the command is | ||
+ | |||
+ | printLab.sh < | ||
+ | | ||
+ | For example, if you're in your '' | ||
+ | |||
+ | printLab.sh lab1 | ||
+ | | ||
+ | | ||
+ | ===== Changing Your Password ===== | ||
+ | |||
+ | To change your password, use the '' | ||
+ | |||
+ | An example run will look something like: | ||
+ | |||
+ | > passwd | ||
+ | Changing password for username. | ||
+ | Old Password: | ||
+ | New Password: | ||
+ | Retype new password: | ||
+ | passwd: all authentication tokens updated successfully. | ||
+ | |||
+ | Note that what you type for the passwords does not show up on the screen for your security. | ||
+ | |||
+ |