commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
The --parents option will cause cp or mkdir to automatically create the parent directory structure.
mkdir --parents /one/two/three/dir
will create /one, /one/two, and /one/two/three as needed before creating dir. cp will copy files with their full directory structure into the target directory with this option.
Thanks to Peter Leung at:
which has good examples of usage.
There are 2 alternatives - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.