Move The Entire Contents Of A Directory Tree To Another Directory

Sep 18, 2008

I want to move the entire contents of a directory tree to another directory.

So for example we may have a directory with 15 directories inside, each directory contains files itself. I want to copy all the files from the directory tree into another directory located somewhere else one the file system. I want only the "files" to end up in the other directory and not the file structure too.

Im running CENTOS latest version.

View 4 Replies


ADVERTISEMENT

Zipping The Contents Of Directory

Jul 28, 2008

Zip the contents of a directory (/path/to/dir/*) and then include a file in that zip that is located here: /a/whole/different/path/file.jpg. Is there a ZIP parameter that allows me to include that JPG file in the ZIP file that I am creating? Can someone give me the command?

Also, instead of zipping the contents inside of the "dir" directory, can I zip the "dir" directory itself but exclude the full path when creating the zip (/path/to/ part). I can do this with the -j parameter but when I do it also excludes the "dir" directory and only ZIPs the content inside of it.

View 3 Replies View Related

What Is Linux Command For Compressing The Contents Of A Directory?

Oct 13, 2009

What is Linux command for compressing all the files under a Directory, as
well as all the files in sub-directories under that directory, so that upon
uncompression the files are created in the right directory and sub-directory.

Also of course what is the command to un-compress this compressed file?

In case: the Linux OS here is Redhat Enterprise and the web server is Apache.

View 7 Replies View Related

Simple Bash Command To Copy Only Directory Contents

Sep 15, 2007

Can anyone tell me a simple way in Bash to copy all of the contents of a directory (and only the contents), including hidden files, into another, existing directory?

E.g.

Code:

# I have this directory structure
- directory_A
--- existing_file
-
- directory_B
--- some_file
--- some_subdirectory
--- .some_hidden_file

# I want to end up with this

- directory_A
--- existing_file
--- some_file
--- some_subdirectory
--- .some_hidden_file
-
- directory_B
--- some_file
--- some_subdirectory
--- .some_hidden_file

# I *don't* want this

- directory_A
--- existing_file
--- directory_B
----- some_file
----- some_subdirectory
----- .some_hidden_file
-
- directory_B
--- some_file
--- some_subdirectory
--- .some_hidden_file

So far I've been stymied in finding a simple way to do this from the command prompt.

View 1 Replies View Related

Rsync Exclude An Entire Directory

Jun 29, 2007

rsync -avz -e ssh --delete --exclude=/home/server/logs/

I want to exclude the logs directory from being transferred, that doesn't work.

View 12 Replies View Related

Apache :: 301 Redirect For Entire Directory

Jul 16, 2004

I renamed a folder. How I can write a 301 redirect in .htaccess to redirect every file in that folder to the new folder?

View 14 Replies View Related

Move Directory To Another Server SSH

Jul 10, 2008

I was just wondering is it possible to move a directory to another server through SSH?

I bought a website a few weeks ago and I have all the files on the server except 30gb of content, now I've tried to put the folder into a tar archive but every time I try it brings up this error:

So I need a way to drag that folder from the old server to my new server through SSH because it will take me ages downloading and uploading all the content.

View 4 Replies View Related

Home Directory Move Issue With Apache, CentOS 5

Apr 19, 2008

I moved the home directory for apache from /usr/local/apache2/htdocs to /home/username/www

When I go to browse the site, I receive a 403 error, You do not have access to / on the server.

It gave the OK default page for apache before moving so I am assuming it is a permission issue.

What do I need to do? apache is running as the default "daemon" user and group.

View 10 Replies View Related

Plesk Automation :: How To Correctly Change / Move Data Directory

Nov 14, 2013

I want to move the data directory to another partition on all nodes. Apache (vhost), IIS (vhost), MySQL (databases) and Postfix (mailbox content). What's the correct way to do this without breaking functionality of PPA?

View 5 Replies View Related

CPanel Directory / Sub-Directory Protection (Linux Shared Hosting)

May 31, 2007

I have a situation like this:

There is a directory say, "Master" and inside, "Master" there is sub-directory, "Slave". A user who has access to, "Master" should be able to access, "Slave" automatically. However, a user who has access to, "Slave" should not have access to, "Master". Inside cPanel this type of protection is not possible.

View 3 Replies View Related

Httpd Directory Alias (public_html) Virtual Directory

Dec 11, 2008

How do I direct my httpd file to point to:

home/USER/public_html
instead of:
C:Users estetc...

I want to do this to make my test server just like the remote server.

View 5 Replies View Related

Usr Directory

Nov 1, 2009

Which files could I safely delete/archive from the usr directory? Also, what is the command to list each subdirectory's size?

View 8 Replies View Related

How To TAR A Directory

Jan 31, 2008

If we want to Create output of "Tar" a directory ; to different server, how can we do that ?

I tried this command, but it does not works

tar -cvf oldserverzip.tar /directory | ssh newserver@newserver.com
Basically, what we want is to shift a site "dump" to another server, without creating a copy at source server (as there is no space available there to create a "dump")

View 12 Replies View Related

SSL Directory

Aug 14, 2007

Cpanel 11
Fedora

Is there any particular reason or advantage to having SSL files load from a different directory than the http files load?

for instance the http home files are in

/home/domain

is there any reason that an index.html (unsecure file) would need to redirect secure files from a directory?

View 4 Replies View Related

/bin Directory

May 6, 2007

how I go about unlocking my bin directory and making it writable again. I tried to do installworld with the latest freebsd release and as soon as it gets to the bin directory I get a permissions denied error. I looked at the permissions and ownership compared to another freebsd box and they all look the same. I tried to create a file by using touch just to test it and I received permission denied error.

View 3 Replies View Related

Directory

Apr 21, 2007

I want to have a directory that i want to set up so you can only a script can see files in a directory. They will be getting the file names from the database, i have turned off directory browsing. I have also set up a Robots.txt and stopped robots from scanning the directory. Is there anything else i can do?

Also is there and software that allows you to download an entire site. Even if it is gigs of content. If so, how do i set it so it will stop that from happening. I am on linux. Centos running Cpanel.

View 2 Replies View Related

Virtual_html Directory

Mar 9, 2009

I know that /www is an alias (symlink) for public_html, but I came across an account with virtual_html. Is there a difference between virtual_html and public_html?
And while I assume secure_html is for secure files, how does it tie in?

View 5 Replies View Related

How To Delete A Directory Through Ssh

Aug 20, 2008

I'm trying to use SSH to delete a directory. It won't delete via FTP.

I've tried variations of the below but nothing seems to work;

rm -f [folder]
rm /-f [folder]

the directory that should be deleted is test.crossroadsclub.net, so I use that as the folder.

View 5 Replies View Related

Protecting A Directory

May 23, 2008

how do i protect a file directory from be accessed view a web browser but still allowing scripts like flash to access it?

i have a folder with xml files in it and i don't want a user pulling them up via there webbrowser.

View 3 Replies View Related

Session Directory

Oct 30, 2008

I need to make this writeable but I can't find it on my server with my FTPclient. Can someone tell me what it is and where it's likely to be?

Maybe I have to create one?

View 1 Replies View Related

/var Directory Full

Aug 6, 2008

I have 10 GB partition and we have mount /var direcotry and now it has been full 97% what can i do and how to manage it and i have no other option because no other space is available to create new partition and mount there.

View 10 Replies View Related

Directory In /tmp Deleted

May 8, 2008

the caching directory I created for eaccelerator deleted by itself. There are 2 copies of eaccelerator, one for apache and one for litespeed. The one for Apache got deleted today. Could it be due to the fact that the directory hasn't been modified or accessed in nearly 2 weeks? It's been that long since Apache was used.

View 4 Replies View Related

IIS Directory Access

Nov 4, 2008

How do I do this in IIS

I need to be able to access resources such as PDFs, videos from my website once a user has logged in but I need to block users being able to access the resources from a url?

View 6 Replies View Related

Ftp Directory Wwwroot

Jul 26, 2008

i updated my old pages on the ftp directory wwwroot.. i deleted the old files and inserted new pages with new names.. now i am not able to see the new website if i type the exact address..the old page is still being viewed. wheras if i omit the www part from the addres i am able to see the new page..

View 5 Replies View Related

Hide Directory

Jul 9, 2008

I want hide the directory of my site:

[url]

How to hide the content list there?

View 4 Replies View Related

Directory Back-Up

Jul 30, 2008

I would like to make some kind of script (probably .sh?) that automatically takes a directory, makes a copy of it then makes a gzip tar and then shoots it over to an FTP server. I would like this to happen twice a day (ie. every 12 hours).

View 13 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved