Here are some common command-line arguments that are frequently used across various command-line utilities:
-
-hor--help: Displays help information about the command, including usage and options.command --help -
-vor--version: Shows the version of the command or program.command --version -
-f: Often used to force an action, such as overwriting files without prompting.rm -f filename.txt # Force delete a file -
-ror--recursive: Used to perform actions recursively, such as deleting directories and their contents.rm -r directory_name # Recursively delete a directory -
-i: Prompts for confirmation before executing an action, often used with delete commands.rm -i filename.txt # Ask for confirmation before deleting -
-n: Often used to specify a number, such as the number of lines to display or process.head -n 10 filename.txt # Show the first 10 lines -
-qor--quiet: Suppresses output messages, making the command run quietly.command -q # Run quietly without output -
-o: Often used to specify an output file for commands that generate output.command -o output.txt # Redirect output to a file
These arguments can vary by command, so it's always a good idea to check the help documentation for specific commands to understand their options. If you have a particular command in mind, let me know!
