Common command-line options in Linux vary by command, but many commands share similar options. Here are some frequently used options across various commands:
-
-hor--help: Displays help information about the command.command --help -
-vor--verbose: Provides detailed output about what the command is doing.cp -v source.txt destination.txt -
-for--force: Forces an action, often used to overwrite files without prompting.rm -f file.txt -
-ior--interactive: Prompts for confirmation before performing an action.rm -i file.txt -
-ror--recursive: Used with commands likecpandrmto operate on directories and their contents recursively.rm -r directory/ -
-aor--archive: Preserves attributes and copies directories recursively (used withcpandtar).cp -a source/ destination/ -
-nor--no-clobber: Prevents overwriting existing files.cp -n source.txt destination.txt -
-lor--list: Lists files or directories (used with commands likels).ls -l
These options enhance the functionality of commands and allow for more control over their behavior. If you have specific commands in mind or need more details, feel free to ask!
