Next: Other commands
Up: Useful UNIX commands
Previous: Directory commands
- cp source-file... (target-file
u target-directory): source-file is copied onto target-file or source-file(s) are copied into the target-directory. After the cp command two copies of the same file exists.
- mv source-file... (target-file
target-directory): mv moves (changes the name of) source-file to target-file or moves the source-file(s) into the target-directory. Note that after mv command, there is not a second copy of the file(s).
- rm [option] filename...: rm removes the entries for one or more files from a directory.
- cat [-u] [filename...]: cat reads each file in sequence and writes it on the standard output. The standard output is usually the screen you are working at. Cat allows you to see the contents of a file on the screen. If the file is longer than one page, the first pages will scroll up and last page will stay on screen.
- more [filename...]: more reads each file in sequence and displays them on standard output, page by page. You should be prompted to press a key after each page is displayed.
- less [filename...]: less works like more, but has some additional features. You can go up, down, to a specific line number with less.
- grep [option] expression [filename]: grep searches the input
files (standard input default) for lines matching a pattern.
Next: Other commands
Up: Useful UNIX commands
Previous: Directory commands