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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 06-08-2005, 05:29 AM   #1
Zester
Confirmed User
 
Zester's Avatar
 
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"?
__________________
* Mainstream ? $65 per sale
* new male contraception
Zester is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-08-2005, 06:03 AM   #2
fireorange
Confirmed User
 
Join Date: Jan 2005
Posts: 1,648
Geeks where are you?
fireorange is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-08-2005, 06:04 AM   #3
fireorange
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.
fireorange is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-08-2005, 06:05 AM   #4
fireorange
Confirmed User
 
Join Date: Jan 2005
Posts: 1,648
Quote:
Originally Posted by Zester
how do use the "cp" command to copy everything in folder "myfolder" including subfolders excluding "folder2"?
Oh wait I don't think you can exclude just one sub-dir,

Anyway here's another bump for you
fireorange is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-08-2005, 06:17 AM   #5
etech
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
etech is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-08-2005, 06:22 AM   #6
beta-tester
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
beta-tester is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-08-2005, 06:26 AM   #7
psili
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.
psili is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-08-2005, 06:56 AM   #8
blazin
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......
blazin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.