Results 1 to 9 of 9
-
02-14-2012, 08:54 PM #1Junior Guru Wannabe
- Join Date
- Mar 2011
- Posts
- 80
Copy files/subfolders to another folder in VPS
Hello.
I have a VPS with Debian 6.0 installed on it.
I have pretty simple question I guess for those who knows better.
For example, I have a folder called /test1/ and inside that folder files and subfolders.
I need to copy those files and subfolders inside /test1/ folder to another folder. I don't wanna copy /test1/ folder but the files and subfolders inside it.
Is there any easy way of doing that?
Thanks!
P.S.
I tried cp -R /test1/ /destinationfolder
But it copies the whole test1 folder
-
02-14-2012, 08:57 PM #2Web Hosting Master
- Join Date
- Mar 2009
- Posts
- 3,816
cd test1;
cp -R * dest
-
02-14-2012, 08:59 PM #3Divided by Zero
- Join Date
- Jun 2009
- Posts
- 1,219
Try cp -R /test1/* /destinationfolder
-
02-15-2012, 11:11 AM #4Junior Guru Wannabe
- Join Date
- Mar 2011
- Posts
- 80
Thank you! It worked.
One more question and sorry for bothering.
I have phpmyadmin installed and mysql of course.
But when I want to connect any application to the database with hostname 'localhost' it cannot be connected.
Is there any way to find out full mysql hostname address (like the ones on godaddy hosting)?
-
02-15-2012, 11:18 AM #5Junior Guru Wannabe
- Join Date
- Feb 2012
- Posts
- 47
It would be better you can use existing registered domain. You just need to create subdomain and install your phpmyadmin into subdomain then point to your IP address after that you can access phpmyadmin anywhere.
-
02-15-2012, 11:21 AM #6Junior Guru Wannabe
- Join Date
- Mar 2011
- Posts
- 80
I did install phpmyadmin, I can log in as root, everything works well there.
The problem is when I want to install some application, for example SMF forum.
In the field of mysql hostname, I enter localhost, but it doesn't wanna connect.
In VPS error log it says that it cannot connect to a database so I assume something localhost does not work for some reason.
So I was hoping there some way, either through SSH or somehow, to find out the full mysql hostname address, like godaddy is providing.
Thanks.
-
02-15-2012, 11:54 AM #7Retired Moderator
- Join Date
- Feb 2005
- Location
- Australia
- Posts
- 5,849
Oh dear. GoDaddy and the like provide a full hostname because the database server is on a different physical machine. In your case, with everything running on the one VPS, you should use localhost.
As root, did you set up the database and database user for the application? eg.
Code:CREATE DATABASE dbname; GRANT ALL ON dbname.* TO dbuser@localhost IDENTIFIED BY "secretpassword";
Chris
"Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter
-
02-15-2012, 11:59 AM #8Web Hosting Master
- Join Date
- Mar 2009
- Posts
- 3,816
-
02-15-2012, 08:58 PM #9(formerly WhichGunDotCom)
- Join Date
- Jun 2011
- Location
- Woodbridge, NJ
- Posts
- 840
Similar Threads
-
Move or copy files from one folder to other
By gamejump in forum VPS HostingReplies: 3Last Post: 06-30-2011, 08:00 AM -
how to restrict/redirect access to folder but not subfolders?
By vitalis in forum Hosting Security and TechnologyReplies: 2Last Post: 11-15-2006, 12:28 AM -
How to copy files and folder using ASP
By geof90 in forum Programming DiscussionReplies: 1Last Post: 07-26-2004, 12:26 PM -
CHOWN a whole directory + subfolders + files
By zmontano69 in forum Hosting Security and TechnologyReplies: 6Last Post: 02-14-2004, 01:00 AM -
Copy certificate files to a folder on another disk
By nogi in forum Hosting Security and TechnologyReplies: 2Last Post: 12-30-2003, 11:36 PM