Ubuntu :: Copy / Move Random Files From One Directory To Another

May 7, 2011

We have two folders: source folder and destination folder. In source folder we have many sub folders and many files of different type!Script that would copy or move defined number of files from source to destination folder. Files must be selected randomly and sub folder in source folders must be selected randomly and we don't copy or move defined number of files just form one sub folder in source folder. In destination folder sub directory structure of source folder should not be preserved. Solution should be robust and as simple as possible.

View 9 Replies


ADVERTISEMENT

Ubuntu :: Copy Files To A Usb At Random?

Apr 14, 2010

I have the following problemI want to copy files to a usb at random?My_mp3_400GB to my_usb_32GBjijiji is enough?But I have little idea how to do it on command, I want to copy files to a usb at random?cp My_mp3_400GB/ /my_usb_32GB????

View 2 Replies View Related

General :: Creating A Script To Move Or Copy Files Into Multiple Directories Below The Files?

Aug 25, 2009

How can you create a script to move or copy files from a main directory into multiple directories below the main directory.

View 7 Replies View Related

Ubuntu Installation :: Freezes At Random Points - Copy Files To Hard Drive

Nov 20, 2010

I'v been trying to install Ubuntu (and actually all other dists of linux (in hope of succes), but running ubuntu on my other machines and prefer it) on my old laptop. Laptop Acer Aspire 1312XC. Have just run a 24 hour RAM test it turned out ok. Have tried with other RAM blocks in aswell. The install freezes at random points in the installation. Mainly when trying to copy files to the hard drive. The only thing i've succeded in installing was Ubuntu server and windows XP. I have tried with ACPI off and all the other special atributes. No success so far.

View 8 Replies View Related

Ubuntu :: Move / Copy Files From Terminal?

Sep 11, 2010

im using ubuntu 10.04 sometimes i find more useful to use the terminal to copy or move folders or files to other directories (more important when they need admin permission)

today i tried to copy ALL files from a directory to another. and i realized that i dont know. i know that that "~ mv /ThisThing/ /ThisFolder/" "~ cp /ThisThing/ /ThisFolder/" but howould i be able to copy EVERYTHING from a folder into another. tis is diferent from copying the folder itself (which i also would like to know)i bet is a simple thing that i havent figured out!

View 5 Replies View Related

Ubuntu :: Copy And Move Files Over Two Systems All The Time?

May 14, 2010

I have to copy and move files over two systems all the time. So when I am on system 1, I simply use the command

Code:
$scp * system2:/some_directory

There are many files in PWD of system1 with different extensions. Of all the files in the PWD on system1, I don't need a file called *residual.dat as it it particularly big and wastes a lot of time copying.How can I make a shortcut so that every time I do scp, it copies everything but the *residual.dat file?

View 1 Replies View Related

Ubuntu :: CPU Load 100% When Copy/move Or Download Files?

May 28, 2011

I wonder if it's normal that when:-I copy files; -I move files;-I download data (files, video, etc.) from the Internetthe CPU is completely loaded at 100%. In comparison, on Windows XP (SP2), on the same computer, the same situation makes the CPU consumes only half of the processor, oscillating near of 50%.N.B. RAM is not affected by the above problem. My computer is equipped with:-CPU AMD Athlon XP 2400 + (2.0 GHz)-685 MB of RAM-Motherboard: SiS-741

View 1 Replies View Related

Ubuntu Multimedia :: Copy Random Jpg From Random Folder

Jan 19, 2010

I'm looking for a script that copies a random .jpg from a random folder in my ~/Pictures folder to my ~/temp folder with a standard filename. This file will then be displayed in Conky. I can fix the last part, but I cannot find a way to do the first part.

View 3 Replies View Related

Ubuntu :: Can't Delete, Copy Or Move Files - Permission Denied?

Jul 20, 2010

I can't perform any of those.Except from the Terminal.I didn't edit any permission... nor installed anything.Don't know what to do.Also, "Move to Trash" appears grayed out, in the right-click menu (for all the files/folders).

View 8 Replies View Related

Fedora :: Copy A Few Files From Windows Directory Into The Wine Directory

Aug 1, 2009

i want to copy a few files from my windows directory into the wine directory - its no big deal, just a few preference files so i dont have to set something up all over again. trouble is, i had the files copied, but i cant find the wine/ c: drive directory anywhere, anyone know where this can be found??

View 8 Replies View Related

Programming :: Copy Files After Search In Array From This Directory To Another Directory?

Jan 3, 2009

After i try to find logfiles follow date/month/year. i want copy this files to another directory with name's directory is time you find(date/month/year).

View 4 Replies View Related

OpenSUSE Install :: Transfer(copy, Move...) Files To Windows?

Aug 13, 2011

I am runnig WinXP and OpenSUSE 11.4 on dual boot.Generaly i am using SUSE, XP only for UpNP Media Center(server) to watch movies stored on my computer on TV via STB.For this i am using TVersity for wich i not found yet Linux alternative - or better say - i found it but is too heavy for my PC(P4 1.6 Mhz, 768 MB RAM, an dinosaur from Nvidia Vanta with 64 MB RAM)But this is not a part of my question.My question is how to transfer(copy, move...?) files from SUSE to WinXP?A large files like avi, mkv, mostly movies.I solved this to copy them on USB and then from USB to Win.This is a very slow proces because my PC have only USB 1.0And before asked me - all files are legaly downloaded from paysites.From SUSE, partitions(disks), folders and files under WinXP are visible but is not possible to copy files on them - acces is denied.Is there any way to do this?Suse is insatlled on LVM - /root/home/swapI am interesting ONLY to copy files from SUSE to Win, not at al from Win to SUSE.Code:

Directory: /home/janez
Sun Aug 14 07:53:26 CEST 2011
janez@linux-cia6:~> su - root

[code]...

View 5 Replies View Related

Ubuntu :: Script Or Command To Move Files To Directory Of Same Name

Mar 12, 2010

I'm doing a little work on my media center and the scrappers seem to do a much better job when each movie is in a directory with the name of the movie. However that's not how i have things set up.I have a few hundred avi files i need moved to directory named the same as the avi file.

View 3 Replies View Related

Ubuntu :: Move Files From Folder/subfolders To A Different Directory?

Jan 10, 2011

I would like to know how to move all the files from a single folder and its subfolders to a single, different location in as few steps as possible. For example when I download files from one of my school's websites, the file I want is located in a deep sub-directory. So, I have to cd many times just to get to the file I want. Is there a way to recursively move all the files within a folder's subdirectories into a new location?

View 2 Replies View Related

General :: Move Files To Another Directory Using A Cron Job?

Sep 29, 2009

I have a php script in cron directory that generates 5 textfiles, after the files are generated, I want to create a script that will move the 5 text fiels to anoher folder name "web".

View 2 Replies View Related

General :: Move All Files And Folders Into A New Directory?

Jan 25, 2011

Unix - In Linux, how do I move all files and folders into a new directory?

View 4 Replies View Related

Ubuntu :: Move Music Files From All Subdirectories To Parent Directory?

Mar 1, 2010

I've found several posts discussing how to do this in with the terminal, but none exactly fit what I am trying to do. And since I'm still very new, I was hoping for some help.

I have a parent directory called "Music." The subdirectories all start with "artist", some go further as in "artist/album/cd1". So right now the structure varies in the following ways code...

How can I move all the files (or the file types that I choose) to the parent directory "music"?

(By the way, for any who are interested, this is so that I can use an external hd with a PS3. ("playstation 3"--for anyone who was in my predicament searching the threads)

View 7 Replies View Related

General :: Move 1 File To A Directory Containing 3 Million Files?

Jul 25, 2011

the system currently have a directory with all the invalid files. how bad is it to move a single file to a directory containing 3 million files already?

View 2 Replies View Related

Ubuntu :: Copy Only Most Recent Files From A Directory?

Mar 4, 2011

I am using Gpodder for the moment and would like to copy the 3 most recent podcast episodes of every podcast to a second directory (in fact the second directory resides on my android phone, mounted via usb)The setup is as followsGpodder downloads the episodes in

/home/PODCASTS/podcast 1/
/home/PODCASTS/podcast 2/
/home/PODCASTS/podcast 3/

[code]....

View 9 Replies View Related

General :: Auto Unrar Files And Move Whitelist To Another Directory

May 10, 2011

I'm looking for a script that can be run regularly with Cron.

Check a folder for Rar files every few minutes, Unrar if present, and delete the left over files once done.

Be able to specify the directory of which folder to watch within the script.

Run an extension white list (.avi, .mkv, .mp4) and blacklist (rar files) of files to be moved.

Specify within the script which folder to move found files to.

I've seen a few online that does some of this or much more than this but I'm looking for something that just does this in a simple and efficient way... (Also for the life of me, I just can't get how to edit this to do what I'm looking for)

View 17 Replies View Related

General :: Find Files With Specific Extension And Move To A Directory?

Apr 18, 2011

I need little help. I want to find all files with extension "*.tar" "*.gz" and "*.zip" and move all those files into "/opt/old" directory. I've tried this command:

Quote:

find . -type f -name "*.tar" "*.gz" "*.zip" -print0 | xargs -0 -r mv /opt/test

It's not working, something wrong after "mv" i guess.

View 10 Replies View Related

Ubuntu :: Write A Bash Script Which Will Find Files Then Move Them To A Specific Directory?

Sep 1, 2011

I'm trying to write a bash script which will find files then move them to a specific directory.

So far I have:

Code:
#!/bin/bash
#script to find and move files
src_dir="/path/to/source/directory"
des_dir_mov="/path/to/destination/directory/for/movies"
des_dir_img="/path/to/destination/directory/for/images"
find $src_dir -iname '*.avi' -type f -exec mv '{}' $des_dir_mov ';'

I'd like to have all the possible movie file types then the image file types checked in a loop.

Every time I try to include an array in this script it breaks

View 3 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

Ubuntu :: Use Rsync To Copy ONLY Home Directory And No Files?

Jun 1, 2011

How can I use rsync to copy ONLY the my home folder (and nothing inside of it, just the folder name) to another machine. I've tried things like

Code:

rsync -av /path/to/src /path/to/dest/

or

Code:

rsync -av -f"+ */" -f"- *" /path/to/src /path/to/dest/

This last option recursively (through the -a switch) copies only folders, including all subfolders. If I try

Code:

rsync -v -f"+ */" -f"- *" /path/to/src /path/to/dest/

nothing is copied (not even my home folder.

View 9 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

Ubuntu :: Command To Copy Files In Directory Created Within 2 Hours?

Apr 22, 2010

Is there a simple command to copy files that have been created within the past 2 hours?I've been looking through the man pages for unisonrsyncfindcpand I can't find anything I'm looking for.All I need is a simple command.Code:Copy folder a to b if created < 2 hours.

View 4 Replies View Related

Ubuntu :: Copy A Sample Set Of Files/pictures To A Directory On Desktop?

Jul 6, 2011

I'm trying to copy a sample set of files/pictures to a directory on my desktop. For my sample from /home/user/pics containing 7,000+ pictures, I have a desired list of:

Code:

user@computer:/home/user/pics$ ls | tail

I use that to generate a list of a few files that I'd like to move to my desktop. I tried:

Code:

user@computer:/home/user/pics$ ls | tail | cp /home/user/Desktop

I thought that might dump the tail list of files for an argument in the cp command, but no luck. I then tried:

Code:

user@computer:/home/user/pics$ ls | tail | cp . /home/user/Desktop

"ls | tail" output, but no luck.

View 5 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







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