rharder
Do not read this sign.
Here's an old *nix trick I rediscovered for copying entire folders from one place to another.
We're going to create a new command and call it "tp" (you can call it whatever you want, really).
Put these two lines in the file:
The fastest way to do this is like this:
where Ctl-D is the Control-D character.
Make the file executable with
and move the tp file to someplace like /usr/bin. You'll need to open a new terminal window to reset the command list.
Now you can copy one directory to another place. Suppose you want to copy the folder /Users/Joe/Pictures into /Library/WebServer/Documents/, you might type
Enjoy.
-Rob
We're going to create a new command and call it "tp" (you can call it whatever you want, really).
Put these two lines in the file:
Code:
#!/bin/sh
tar cvf - $1 | ( cd $2; tar xvf - )
Code:
% cat > tp
#!/bin/sh
tar cvf - $1 | ( cd $2; tar xvf - )
Ctl-D
Make the file executable with
Code:
% chmod +x tp
Now you can copy one directory to another place. Suppose you want to copy the folder /Users/Joe/Pictures into /Library/WebServer/Documents/, you might type
Code:
% tp ~/Pictures /Library/WebServer/Documents
Enjoy.
-Rob