This is an old revision of the document!
Access A Shell Prompt And Issue Commands With Correct Syntax
General Information
This objective centers around being able to correctly read man page syntax.
Reading Man Pages
man ls, Synopsis section
ls [OPTION]... [FILE]...
- ls - The command
- [OPTION] - items in brackets are optional
- … - previous item can be repeated (so, you can have multiple OPTIONs)
- [FILE]… - optional target file/directory, can be multiple
man mv, Synopsis section
mv [OPTION]... [-T] SOURCE DEST mv [OPTION]... SOURCE... DIRECTORY mv [OPTION]... -t DIRECTORY SOURCE...
- Three different ways to use the mv command
- mv SOURCE DEST (1 source, any destination or rename a file)
- mv SOURCE… DIRECTORY (move multiple source files, dest must be directory)
- mv -t DIRECTORY SOURCE… (move all SOURCE argument(s) into the target (-t) directory)