Skip to content

Instantly share code, notes, and snippets.

@ianthekirkland
Created October 18, 2012 15:32
Show Gist options
  • Save ianthekirkland/3912586 to your computer and use it in GitHub Desktop.
Save ianthekirkland/3912586 to your computer and use it in GitHub Desktop.
shell syntax
Move all files with names ending in ".jpg" from the current folder to the Documents directory.
$ mv *.jpg ~/Documents
____________________________
Move the "Documents" folder to "Documents backup". (quotes are needed because of the space in the folder name.)
$ mv Documents "Documents backup".
____________________________
Rename .txt files to .html
$ for f in *.txt; do mv ./"$f" "${f%txt}htm"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment