Renaming/moving files with suffixes quickly:
cp /home/foo/realllylongname.cpp{,-old}
This expands to:
cp /home/foo/realllylongname.cpp /home/foo/realllylongname.cpp-old
More Related Contents:
- How do I parse command line arguments in Bash?
- How do I set a variable to the output of a command in Bash?
- Why do you need ./ (dot-slash) before executable or script name to run it in bash?
- How to iterate over arguments in a Bash script
- Timeout a command in bash without unnecessary delay
- What is the purpose of “&&” in a shell command?
- Capture stdout and stderr into different variables
- Remove the last line from a file in Bash
- How to get Maven project version to the bash command line
- How to replace ${} placeholders in a text file?
- How to run some command before or after every Bash command entered from console?
- How to use arguments from previous command?
- How can I get a recursive full-path listing, one line per file?
- How to reload .bash_profile from the command line
- Why do I get “/bin/sh: Argument list too long” when passing quoted arguments?
- Convert line endings [duplicate]
- Multiplication on command line terminal
- -bash: !”: event not found [closed]
- Why doesn’t my terminal output unicode characters properly?
- Can I export a variable to the environment from a Bash script without sourcing it?
- Passing arguments to an interactive program non-interactively
- How to define hash tables in Bash?
- Why isn’t tilde (~) expanding inside double quotes? [duplicate]
- What is the difference between “$@” and “$*” in Bash? [duplicate]
- Count occurrences of a char in a string using Bash
- What is the exact meaning of IFS=$’\n’?
- How to check if running in Cygwin, Mac or Linux?
- Using getopts inside a Bash function
- choosing between $0 and BASH_SOURCE
- Escaping forward slashes in sed command [duplicate]