Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| labs:unix_basics [2016/02/29 22:56] – [Copy Files and Directories] admin | labs:unix_basics [2024/09/03 20:34] (current) – [Basic Unix Commands] admin | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| > man ls | > man ls | ||
| - | [[http:// | ||
| ===== Directory Access/ | ===== Directory Access/ | ||
| Line 30: | Line 29: | ||
| ==== 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 my_src_directory destination_directory | cp -r my_src_directory destination_directory | ||
| Line 42: | Line 48: | ||
| If the destination is a directory, then the file(s) are moved into that directory. | 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 125: | Line 135: | ||
| Note that what you type for the passwords does not show up on the screen for your security. | Note that what you type for the passwords does not show up on the screen for your security. | ||
| + | |||
