Portal Home > Knowledgebase > Articles Database > How can I zip one file with Shell and move it
How can I zip one file with Shell and move it
Posted by Hawi, 12-29-2007, 09:49 AM |
Hi
I have a question ...
How can I zip one file with Shell and move it to another account on the same server.
also,
how can I copy a database from one account to another one on
the same server.
thank you.
|
Posted by NEXCS-Greg, 12-29-2007, 12:08 PM |
If you're only moving one file, you shouldn't need to zip it...just move it from one account to the other:
mv /path/to/file.ext /path/to/new/account/file.ext
If the new account has a different owner than the one you're moving it from, make sure to chown the file to the new account user.
As for the database, you could either use a tool like phpmyadmin to export the database and then use it again to import that file to the new database, or you could do it on command line:
mysqldump -Q --opt -u username -p databasename > backup.sql
to export it to a file named backup.sql
mysql -u username -p newdatabase < backup.sql
to import it to the new database.
|
Posted by Hawi, 12-29-2007, 03:18 PM |
Thank you "NEXCS-Greg"
that was VERY helpful ...
many thanks for your help.
|
Posted by NEXCS-Greg, 12-29-2007, 11:04 PM |
You're welcome!
|
Add to Favourites Print this Article
Also Read
ABUSE Issues (Views: 846)