General :: Copy A Partition To A Directory, Then Mount It?

Sep 4, 2009

i've been getting into problems trying to move around my partitions, by copying them to a directory on a partitions with alot of extra space, then mounting then with --bind. i think it's todo with the permissions, like i can run gdm for the gui but i can't login.startx doesn't work though, gives me some errors but i don't know alot about x windows. but like the partitions are mounted, but just the system doesn't work properly with them this way?this is my method

Code:
rsync -aHPvx /usr/ /store/usr_proxy
then in fstab
Code:
/store/usr_proxy /usr ext3 bind,defaults 0 0

View 2 Replies


ADVERTISEMENT

Ubuntu :: Access Files That Existed In Directory Before Mount Partition To Directory?

Feb 21, 2010

Recently I mounted a larger partition into my home directory since I was running out of space, Everything went smoothly, but it caused me to wonder about something I cant figure out. While playing with the mount unmount commands when I was copying everything over... before editing my fstab.

Is there a way to access the files that existed in a directory before you mount a partition to that directory? after mount the original files are gone.unmount and they are back, Where do they go?

View 3 Replies View Related

General :: Using Cp Properly - Copy A Directory Somewhere Else Into This Current Directory ?

May 13, 2011

I am in my current directory. I want to copy a directory somewhere else into this current directory. Lets say I want to take it from direc1/direc2 and the directory I want to take is called demo.

Code:

That is what it shows in the man pages, but when I do that, it says cp: no match

View 5 Replies View Related

General :: Partitioning - Copy GNU Installation From A Smaller Partition To A Bigger Partition?

May 4, 2011

I got a new hard disk for my laptop and I want to move my Gentoo installation from old HDD to new.

Most simple guides recommend use of dd to copy the whole partition byte by byte.

I'm moving to the new drive because I don't have enough space on the old drive, so I don't want to simply clone the partition. Instead I need the destination partition to be bigger. Would dd work well in that case?

Assuming that I use same partition types on the new drive, would I be able to use simple cp with appropriate settings?

View 1 Replies View Related

General :: Mount One Directory To Another While Mapping The Original Directory's UID To Another

Aug 23, 2011

I'd like to mount the directory /var/www/mysite to the directory /home/daniel/mysite, but also have the user of the mounted files mapped from the original user (www-data) to my own user (daniel). So that the file /var/www/mysite/index.php who's user is www-data will appear in the mounted directory as /home/daniel/mysite/index.php and be owned by daniel - and alternatively, if I create a file /home/daniel/mysite/test.php with my own user, it will be created in the original directory under the user www-data Is it possible? If not, what alternatives do I have so I can use an IDE and still make sure all the files belong to the HTTP server's user?

View 2 Replies View Related

General :: Auto Mount More Than Directory In The Same Directory ?

Apr 7, 2010

How can i auto mount more than directory in the same directory ? i want to automount 2 home directories in the /home and still be able to enter the other home directories !

The problem that i've another account on the system with home directory joe when the user1 home directory auto mounted i become unable to enter joe home directory !

View 1 Replies View Related

General :: Can't Copy A Directory Without Using -R ?

May 26, 2010

Why can't I copy a directory without using -R ? It shows "cp: omitting directory" .

View 3 Replies View Related

General :: Copy *.pdf From One Mount To Another?

May 23, 2010

I am trying to copy a particular type of file from one mounted drive to another, but I am having difficulties.I would like to copy all of my pdf files from my mounted drive to my USB drive.I am currently in my /mnt/sda2 (sda2 is a Windows XP) directory and want to copy all of the *.pdf files to /mnt/sdf4 (sdf4 is a USB drive).I have tried:copy . *.pdf /mnt/sdf4 (this only copies a couple of files)copy -R . *.pdf /mnt/sdf4 (this starts copying the directories instead of the files)o I want to copy only the *.pdf files contained in the entire sda2 mount over to sdf4.

View 9 Replies View Related

General :: Can't Copy Files From Directory With "&" Symbol In Directory Name

Mar 18, 2010

I am using my media server as my podcast collector. I am in the process of learning the ins and outs of NFS so i can mount a NFS directory and transfer my podcasts from server to player. For now i am using scp to transfer podcasts from server to desktop then to player. The problem is the path to the directory of one of the podcasts is /home/user/gpodder-downloads/The BILL&TIMMY Show Podcast.

whenever i try and run my scp command it fails because it thinks that TIMMY is a script i want to run in the background. I have tried to back-slash escape the character, i've tried single quoting and double quoting the character and i still get the same problem. as it sits now i have to move all podcasts to another directory and then transfer them to my desktop...but i would like to transfer the podcasts without un-necessary steps.

View 8 Replies View Related

General :: How To Recursively Copy Directory Into Another One

Apr 25, 2011

I moved to Mac OS X recently and bumped into the "feature" of Mac where copying files from an external drive resets the file modification/update date/timestamp to the current date (which Windows does not), causing a disaster for my 10+ years of backup work files where date is important. So, before I learned how to avoid that (e.g. using the -p "preserve" flag in the "cp" copy command) I have in the meantime added to my new Mac hard drive many more files as well as updating existing old files.

I have a backup external hard drive with all my old data and proper modification dates. I have a Mac hard drive with reset modification file dates (a single or two particular days). The Mac hard drive has all the "true" and "current" file contents with files modified and added. I need to Copy all the original files from the external harddrive, preserving file metadata (really only modified date), but ONLY overriding the new internal Mac hard drive IF

The file contents (md5 or whatever) is the same or The file was updated after the day (which of course I can see on all files) on which the original disasterous cope was performed (implying the file is new or modified) Ensure the copy leaves all the new and modified files completely intact on the Mac internal hard drive. "No prompting/stopping of the copy of any kind (i.e., not verbose) is required but is o.k". "Recursive copy - obviously I would like to copy all* files folders and subfolders found in export".

View 1 Replies View Related

General :: Copy Contents Of One Directory Into Another

Jul 7, 2011

I would like to copy the contents of a directory into another. I don't want to copy the directory and all files and directories under it, but just the contents of the directory just as if it were a regular file. Doing cp -r target dest copies the directory and the entire hierarchy rooted in it. I get error if I do not include the -r option. (I am calling cp from within a C program.)

View 3 Replies View Related

General :: Copy Whole Directory To Ftp Server

Oct 28, 2010

I have this scripts that is meant to create certain files and a directory by date and once its finished its meant to copy that direcory an the example ftp server.

View 1 Replies View Related

General :: Copy A Directory Without It's Contents?

Nov 5, 2009

Is there a way to copy a directory (retaining the permissions and owners) without copying the contents of the directory?

If there is no such thing... then I need a way to determine if a target path is a file or a directory, and if it is a directory I need to make a new directory elsewhere that has the same name, owner and permissions.

Basically, I'm trying write a script to copy 200 GB of files over a network to a new server, and I'd like to do it by generating a list with the find command. That way, I can migrate large chunks of the files over the course of a week, and on the day of the migration generate a new list of files that changed in the last week and then copy just the chagned files over minimizing the down time. However, the list will contain directories that I can't just use the 'cp' command on because it will copy all the contents of the directory.

View 5 Replies View Related

General :: Find And Copy In The Same Directory

Sep 1, 2010

I installed a new music application. It reads covers.jpg as the cover of the album, however, my covers files where named album. I dont want to rename, I want to make a copy of album.jpg and if possible as well rename it to covers.jpg. The file has to be in the same folder that it currently is. I have looked around to see how I can do this but have not been able to.

View 14 Replies View Related

General :: Copy Files From Directory ?

Dec 22, 2009

I have four directories and i want to copy only the files in the directory to a single directory, how can i do it with the cp command.

The directories names are dir1, dir2, dir3 and dir4 and i want only the files from these directories to a single directory called mainDir.

View 3 Replies View Related

General :: Copy Everything In Current Directory To Subdirectory?

Aug 25, 2010

How Can I Copy Everything in Current Directory to Subdirectory in linux console

View 6 Replies View Related

General :: Copy Permissions From One Directory Recursively To Another?

May 23, 2011

I have a system where the permissions of many files are messed up. I have another system that has the same files, if I put that hard drive in, without simply overwriting the files, is there a way where I can recursively set the permissions of each file to that of this other directory?

View 1 Replies View Related

General :: Copy A File From Remote Directory

Aug 4, 2011

How to copy a file from remote to local directory and vice versa using ftp bat script file in telnet.

View 1 Replies View Related

General :: Copy Files Have 2 Year Old To Another Directory?

Apr 16, 2010

i just need to make copy files have 2 year old to another directory i know how to use cp command but i am not able to do that

View 2 Replies View Related

General :: Copy Files To A Respective Directory

Jul 27, 2011

I am trying to read mulitple files and copy its contents (files) to a respective directory. I have a folder "Oracle". Under this i have mulitple files as mentioned below.

Each of the above has a list of files in them.

Now i have created new directories with the same name as the above files in another location say

The script that i looking at has to read the files from Oracle, backup its contents to its appropriate new directory.

Example:

View 2 Replies View Related

General :: Copy Range Of Files In Directory?

Mar 29, 2010

I want to know how to copy a range of files from one directory to another.

For example say I list the contents of a directory, how would i copy files 5-15 to another directory?

View 3 Replies View Related

General :: How To Mount HDD And Copy Data To Server

Apr 12, 2010

I have a HDD that cannot be bootup (should be the boot file problem, I want to get back the data in it, so I plug it to another server and trying to copy the data from the failure HDD to this server. Now, the server is re-boot and in maintenance mode as the HDD cannot do the system check. when I try to copy data, it pops the server is read-only system.
1. How to let me write data to the server ; or
2. Let me boot up the server, then I will mount the HDD to it and copy the data to the server.

View 1 Replies View Related

General :: Copy Files From Directory Of One User To Directory Of Another User?

Apr 15, 2011

Is it possible to copy files from directory of one user to directory of another user in linux?

View 7 Replies View Related

General :: Find Document Files And Copy Them To Another Directory?

Nov 7, 2010

This is a bit of a basic question but I'm trying to copy all .doc files I find in a directory and copy them to another directory.I know each command:

find -name '*.doc' .

and:

cp filename location

how can I combine the two commands?

View 3 Replies View Related

General :: Copy A (big) Directory Over Another Changing Only The Files That Differ?

Feb 3, 2011

I have directory a and directory b. They are big. b is almost identical to a. "almost" means that 4-5 files differ, and I don't know which they are. I want to copy b over a, but only the files that differ. i'm in bash.(no, I can't simply delete a and replace it with b, because 1) a is version-controlled 2) a full copy (or a mv) would take too much. I want to copy only the files that differ).

View 4 Replies View Related

General :: Copy - Take A Snapshot Of A Directory As It Was At A Particular Point In Time?

Mar 4, 2011

I have a directory containing a lot of result log files (directory size ~ 4GB), and a set of processes running that keep on writing to these files. To be able to correctly analyze the results at a later time, I want to copy the whole directory to an archive destination, and I cannot stop the processes.

I want a copy of the directory as it was at a particular point of time. As the size directory is huge (which means it takes about 40 seconds to copy) and some of the files are being written to, a normal cp -r does NOT give me a snapshot at a particular point in time, rather a snapshot of files spread over some 40 seconds. This is not good enough.

Is there a way to get an exclusive lock on the directory and all its components while copying?

View 5 Replies View Related

General :: Copy Directory Into Another Preserving Specific Structure?

Jul 20, 2011

I would like to find the command that copy my eclipse options to another workspace code...

It doesn't work, and it could be source of error to write the path .metadata/.plugins manually. It certainly a better idea to create a complete script ?

View 1 Replies View Related

General :: Rsync To Copy Directory Tree From NAS Drive ?

Apr 10, 2010

I have a WD world book edition 1TB NAS drive, and just purchased an acomdata 1tb drive and connected it to the NAS via USB. If I recall I think the WD NAS has a ext_ or some type of linux filesystem on it, and the acomdata has a ntfs filesystem on it.

What I want to do is copy over certain directory trees of the NAS to the USB attached drive. I usually use MS synctoy to sync folders from my windows pc to the NAS drive, and MS richcopy to make the initial transfer from PC to NAS. For this operation though, since it is taking place entirely on the NAS and its connected drive, I thought that rsync would be the best option, and it is available on my NAS drive.

Last night I entered in rsync -avr /movies/* /usb1-1share1/ to copy the entire "movies" dir to the drive, which shows up as usb1-1share1 on the NAS drive. It copied most of the directory tree ok, but a lot of the folders were empty, so this morning I tried rsync -Carv --ignore-existing /movies/* /usb1-1share1/ to try and get all the files missed, without recopying the 24GB that did make it across. This also managed to copy a few more GB over, but not everything.

I am running the command from an ssh session on the NAS using putty on my PC, in as user "admin" which should have all rights over these folders. There is a bunch of errors in the command window like this: rsync: failed to set times on "/shares/usb1-1share1/movies/classics/fulldvd/First Blood DVD/.VTS_01_2.VOB.RxdjWZ": Operation not permitted (1)

I want to restart another session and get the files it missed, but I want to find out what I am doing wrong first. Should I be doing this as root user? am I missing some switches or just plain doing it all wrong?

View 3 Replies View Related

General :: Copy Contents Of Home Directory To Other Users?

May 3, 2011

I've created other users in my machine. now I want to add all my home directory contents and settings to the home directory of other users. how can i do that? Can I do it from /etc/skel directory?

View 1 Replies View Related

General :: Script To Copy Some Files With Ftp After Searching In The Directory?

Apr 20, 2011

I was trying to develop a script which needs to check the count of files on hourly basis and if it find any addition it has to sftp and send a email on the status with filenames and number of files copied via sftp. I will put it on cron to run every hour.

I'll use ls /abc|wc -l to count the no. of lines for the first time and from then whenever a new file will be inserted it'll copy that file to another location or I'll take the date of the files and whichever is having a new date that will be copied to another location.

View 7 Replies View Related







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