Ubuntu :: Copy Recursively While Skipping Existing Files?

Oct 7, 2010

I'm trying to copy some files via terminal because i had some issues with nautilus crashing in the middle of the operation. So how can i copy files recursively while skipping existing ones?

View 7 Replies


ADVERTISEMENT

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 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 File Recursively Ignoring Destination Directory Structure?

Jul 8, 2011

I have the following content on the source directory:

source/foo.txt
source/bar/another_file.txt
source/bar2/and_another.txt

I want copy those files to a destination directory which, after copy, shall look like this:

destination/foo.txt
destination/another_file.txt
destination/and_another.txt

How can I do this? It seems that "cp" lacks such an option

View 1 Replies View Related

Ubuntu :: .ogg Files Skipping But Not In Windows?

Jan 18, 2011

I have noticed that my music, which is all in .ogg format, is skipping every once in a while in Ubuntu, but not in Windows (I use Banshee in Ubuntu; Winamp for when I use Windows). My whole music collection isn't skipping entirely--that is, not every music file has this problem. However, the ones that do, the music file skips like a scratched CD for 1-2 seconds. The same music file doesn't do this at all when played with Winamp in Windows. Are my music files corrupted? What is going on? None of the music files were like this before (with the skipping), but for some reason, the skipping occurs only in Ubuntu, not Windows/Winamp. Not every music file has this happening, but some of them do.

I have been thinking about converting all my music files to .mp3, or re-converting the files as .ogg as another copy,

View 9 Replies View Related

Ubuntu :: Rsync Not Skipping Unchanged Files?

Mar 1, 2010

I am running this command,

Code:

rsync -vrl --progress --stats --perms --delete --exclude '*~' --exclude 'Music' --exclude 'server' --exclude 'Downloads' --exclude 'Ubuntu One' --exclude 'Videos' /home/dave/ /media/server/backup/desktop/dave

It transfers files that remain unchanged. The one that I notice every time is

Code:

.VirtualBox/HardDisks/anOS.vdi

I have several OSes installed in VirtualBox, so this takes a very long time.

View 1 Replies View Related

Ubuntu Installation :: Kubuntu Will Not Install - Skipping Missing Files

Jan 9, 2010

I just tried to install kubuntu 6 times on my laptop. I have downloaded the file from a different mirror each time and burned the image via brasero. This used to work for me... Kubuntu will not install. Keeps saying its skipping missing files or something. Anyone else getting this? I eventually gave up on 9.10 and am now trying alpha 1...

View 7 Replies View Related

Ubuntu Multimedia :: Skipping Through Wma Files Even With Restricted Formats Installed?

Nov 23, 2010

I can play WMAs with MPlayer but when I try to skip forward a few minutes it plays for a split second, and then plays at another random part of the video making it impossible to play a WMA from anywhere but the beginning.

Code:
mplayer -demuxer lavf ccent01.wmv.The above command opens the video but there is no menubar, scroll bar, or any reaction to right click although strangely scrolling my mouse wheel seems to randomly skip through the video. In VLC when trying to play the same file I get the error:

Code:
No suitable decoder module: VLC does not support the audio or video format "wmas". Unfortunately there is no way for you to fix this. No suitable decoder module: VLC does not support the audio or video format "MSS2". Unfortunately there is no way for you to fix this.After converting the .wma file to .mpg, and also .avi using a command similar to:

Code: mencoder ccent01.wmv -ofps 23.976 -ovc lavc -oac copy -o ccent01.mpg. There is no change playing the file with mplayer and in VLC it now only gives one error: Code: No suitable decoder module: VLC does not support the audio or video format "wmas". Unfortunately there is no way for you to fix this. I'm preparing for a Cisco exam later in the week and would like to spend tomorrow watching hours of computer based training videos but would rather not have to do it in Windows. Already tried using Media Player Classic in WINE but it crashed. Is there a workaround? Oh and I already have ubuntu-restricted-extras installed.

View 6 Replies View Related

Ubuntu :: Copy Existing Partition To 10.10?

May 7, 2011

I am running ubuntu 10.10 on a drive with 3 partitions. 1 windows and 2 ubuntu partitions.

The ubuntu that I am running right now is on a partition that is too small. I need to either expand it to include the other ubuntu partition or reinstall 10.10 and copy my existing partition to it. Can this be down?

I have this version working the way I like it and have tried 11.04 and am holding of for now. Still the fact remains that my working copy is on a partition that is really too small I only have 2 gig free space on a drive that is a 500gig.

View 3 Replies View Related

General :: Recursively Cp All Directories, Files And Hidden Files?

May 17, 2010

Ubuntu 10.04

I want to copy all directories, files, and hidden files and hidden directories with one command. I want these items to replace any same items in the target directory.

I have tried several things, such as:

cp -r *
cp -aR *

but I only seem to get visible files and directories. Obviously, I am missing something. (A brain, probably....)

View 9 Replies View Related

General :: Rsync With Skipping 0 Bytes Files Option?

Jun 10, 2011

For backup purposes, I have been trying to find out a solution for Rsync -avr sourcefolder targetfolder with Skipping 0 bytes files option.

However it seems that they are no solutions. Would someone have an idea, to skip to source files into the sourcefolder that have no content, ie. 0 bytes?

View 2 Replies View Related

Ubuntu Multimedia :: Install Of Karmic And Get The Occasional Skipping When I Play Files Through Amarok?

Feb 8, 2010

I have a fresh install of Karmic and get the occasional skipping when I play files through amarok.If a play a CD through Rythmbox the sound is ok, so I don't think its got anything to do with pulseaudio. Could it be the xine backend?

View 1 Replies View Related

Ubuntu Installation :: Copy Across Existing Settings From One Version Of 10.10 To Another?

Dec 11, 2010

Due to a problem I had with a 10.10 upgrade [URL] and the need to access data on the pc I upgraded, I downloaded the live CD and installed on the same pc. Now I have two versions of 10.10 on the same pc but in different partitions. Is there any way I can copy my settings from the partition that is not working (the upgraded one) to the one that is working?

View 1 Replies View Related

General :: Encoding Multi-jpegs With Mencoder, Skipping Broken Files?

Jan 16, 2011

I've multiple jpegs uploaded form IP cam via FTP, I use mencoder to periodically pack them into single avi file, problem is that sometimes one or two jpegs submitted by cam are broken, and this make mencoder exit, without producing movie

View 1 Replies View Related

General :: Copy Certain File Types Recursively While Maintaining File Structure On Destination?

Jun 14, 2011

I have just been bothered by a fairly small issue for some time now. I am trying to search (using find -name) for some .jpg files recursively. This is a Redhat environment with bash.

I get this job done though I need to copy ALL of them and put them in a separate folder BUT I also need to keep the order intact after copying.

For e.g - If I get a JPG file under /home/usr/new/1/ then the destination also needs to be /test/old/new/1/.

At the moment, I am simply putting all files under /test/old/ and I can't somehow get the later /new/1/ folder path created under /test/old/

I understand this could well be done using while OR if else loop, though if someone can just guide me with a hint, I would be really grateful.

I will complete the rest of the steps and was asking here since I am still not comfortable with the shell/bash scripts yet and planning to be really good at it over the next couple of months.

View 1 Replies View Related

Ubuntu :: Recursively Deleting Files From Within Archive

Feb 2, 2010

I've got a directory of geographic data with ~2,000 archives. Each archive (e.g. foo.zip) has two files, the second of which I'd like to remove:

Now, I can remove the _num.tif file with the command:

How do I do this with ALL the files in the directory? If I try the -r (recursive) option, that fails with -d.

View 4 Replies View Related

OpenSUSE Install :: Copy Existing Suse 11.1 Setup To New New Hardware?

Jun 16, 2010

I am running Suse 11.1 on a netbook that I would like to free up for work. Since I would like to keep the existing setup on the new machine, I was wondering if there was a process for copying an exisiting installation to new hardware. This will be a desktop system ( Cheapie PIV most likely )

View 6 Replies View Related

Ubuntu :: Recursively Copy From Directory To Another Directory

Mar 23, 2010

I'm facing a little trouble with copying a .txt file(only) from a directory and subdirectory to another directory. -R command don't work I think if I want to do this, since I don't want to copy subdirectory.

View 6 Replies View Related

Ubuntu Servers :: Renaming Files Recursively From Folder

Mar 26, 2011

I'm trying to rename files recursively from a folder. I want to delete the & from every filename. i've searched the net and found the following script:

Code:
#!/bin/bash
dir=/whatever/directory
for file in `ls $dir` ; do
# ANYCASE TO UPPERCASE:
newname=`echo $file | tr '[a-z]' '[A-Z]'`
mv $dir/$file $dir/$newname
done
and changed it:

Code:
#!/bin/bash
dir=/home/test
for file in `find $dir -type f` ; do
#rename files containing &
newname=`echo $file` | tr '[&]' ''
mv $dir/$file $dir/$newname
done

But the for loop explodes the filename after each & sign, so i don't have a whole filename. if the file is named lorem & ipsum, the for loop will break it in 3 parts.

View 2 Replies View Related

General :: Recursively Count All The Files In A Directory?

Oct 12, 2010

I have a really deep directory tree on my Linux box. I would like to count all of the files in that path, including all of the subdirectories.

For instance, given this directory tree:

/home/blue
/home/red
/home/dir/green
/home/dir/yellow
/home/otherDir/

If I pass in /home, I would like for it to return 4 files. Or, bonus points if it returns 4 files, 2 directories. Basically, I want the equivalent of right-clicking a folder on Windows and selecting properties and seeing how many files/folders are contained in that folder.

How can I most easily do this? I have a solution involving a Python script I wrote, but why isn't this as easy as running ls | wc or similar?

View 5 Replies View Related

Software :: How To Rename Files Recursively In Bash

Sep 11, 2009

I have thousands of files in hundreds of sub-directories that need renaming. The files I need to rename all look as below:
Note the .ogg.mp3.
been_all_around_this_world.ogg.mp3

I want to remove the .ogg from the files, so in this one case it would end up renamed looking like this:
been_all_around_this_world.mp3

View 2 Replies View Related

General :: Removing Files Or Directories Recursively

Jan 29, 2010

The rm command man pages discusses removing files or directories recursively. So what is meant by deleting a file or directory recursively? And what are some reasons for doing so?

View 3 Replies View Related

Red Hat / Fedora :: Extracting Files In Sub Directory Recursively

Feb 27, 2010

I am new in Linux and I need to extract alot of zipped files (different format (e.g tar.gz, tar.gz2)) which are in subdirs and I do not want to go to each subdir and extract each file because it will take alot of time. Is there away to extract all files that are existing in dirs and subdir with "for loop" or is there a script that can do the job automatically.

View 1 Replies View Related

Red Hat / Fedora :: Change Folders To 775 And Files To 664 Recursively?

Feb 11, 2011

I need to change folders to 775 and files to 664 recursively, but this bash does not has find command (?). How can I change them recursively?

View 3 Replies View Related

General :: List Contents Of All Files Recursively?

Jan 22, 2011

What I would like to do is to print the contents of all text files in a particular directory, recursively. Problem being that there are directories and possibly binaries scattered around in the filesystem as well.

Trying cat * works as long as there are no directories in there, but when there are it gives an error instead and prints nothing.

I'm sure it's easy using file -f or something but I can't figure it!

View 8 Replies View Related

General :: Script To Rename Files Recursively?

May 8, 2011

I'm planning to writing a script to rename files recursively.

To be said that I'm using /bin/sh (not /bin/bash) as this is the only shell available on the busybox of the linux router (tomato) I'm using.

Basically I would like to rename files with extension .jpg using as a suffix the filename of another file in the very same directory with extension .avi

The reason for this is because pretty much all the DLNA devices like modern TV playing .avi files will display a thumbnail of the video when browsing the filesystem, however to do so they'll need .jpg image wit hthe same filename of the video in the very same directory.

View 3 Replies View Related

General :: How To Recursively Find Files Over Certain Size

Apr 15, 2010

I made an account under freeshell.org and it has been very satisfactory so far. I recommend everyone getting an account under freeshell.org. But anyways, how do I find files over, for example, 500 KB, in the entire, my shell account?

View 1 Replies View Related

General :: Recursively Searching PHP Or HTML Files

May 5, 2010

I'm a frequent user of grep. I know that I can recursively search a directory using the -r flag:
Code:
// will recursively search all files
grep -r 'some string' *

However, if I want to limit my search to PHP files, the -r flag is suddenly useless:
Code:
// for some reason, this only searches the PHP files in the current dir
grep -r 'some string' *.php

Any good way to recursively search a directory and its subdirs for a string but ONLY look at PHP or HTML files (and possibly TXT files too) ? I'm really hoping for a nice, short command that doesn't involve using an exclude file and which isn't really painful to type. I do this kind of search very frequently and have resorted to either searching EVERY file which is really slow (TAR and ZIP files really slow it down) OR typing repeated commands to search *.php, */*.php, etc.

View 6 Replies View Related

Ubuntu Networking :: Copy Files From XP Infact Folders Using TERMINAL In Netbook, Not Copy And Paste Using Mouse?

Jul 9, 2010

just installed ubuntu couple of days back on my netbook. I am still a beginner, enjoying my adventure exploring ubuntu. I have another desktop which runs on XP. I am able to access XP shared folders through my netbook(linux). However, i wanted to copy files from XP infact folders using TERMINAL in my netbook, not copy and paste using my mouse. Are there any commands for it?

View 1 Replies View Related

General :: List Recursively All Files With Timestampsand Fullpath?

Jan 3, 2011

I want to list recursively all files in given direcotry, with their fullpath and their timestamps.Something like this:10:30 Dec 10 2010 /tmp/mydir/myfileI've tryied with:find . -type f -exec ls -la {} ;but that don't give me the fullpath.

View 3 Replies View Related







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