![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Jul 2003
Posts: 5,344
|
unix question
lets say I have a folder by the name of "myfolder"
which subfolders: "folder1" "folder2" and "folder3" how do use the "cp" command to copy everything in folder "myfolder" including subfolders excluding "folder2"? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Jan 2005
Posts: 1,648
|
Geeks where are you?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Jan 2005
Posts: 1,648
|
http://www.us-webmasters.com/FreeBSD...-unix-FreeBSD/
I think you need to add -r for recursive. Hope that helps. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
Confirmed User
Join Date: Jan 2005
Posts: 1,648
|
Quote:
Anyway here's another bump for you ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Feb 2004
Location: Right next to you....
Posts: 1,148
|
I dont think you can exclude a sub folder either.
cp -rf folder would force to copy the folder recursive |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Rock 'n Roll Baby!
Join Date: Sep 2004
Location: USA, temporarly
Posts: 22,562
|
for example:
ln -s myfolder/* .
__________________
Sig for sale. Affordable prices. Contact me and get a great deal ;) My contact: ICQ: 944-320-46 e-mail: manca {AT} HotFreeSex4All.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
|
I know you can tar the directories and by use of a text file with the folders you don't want listed in there, the tar will exclude anything you don't want. Then just move the tarball to where you want and untar.
I don't remember how exactly to do it, but I've used it on copying huge photoset directories with tons of folders and files I didn't want and tons that I did.
__________________
Your post count means nothing. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: Aug 2002
Posts: 2,781
|
cp -rp
- the p will preserve the file attributes
__________________
I don't endorse a god damn thing...... ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |