Sponsored Content
Top Forums UNIX for Dummies Questions & Answers find mv and create directory structure Post 302494524 by fistikuffs on Monday 7th of February 2011 01:59:05 PM
Old 02-07-2011
Quote:
Originally Posted by ctsgnb
So you want to move all your files
Code:
/whatever/b/*.flac

to
Code:
/whatever/newdir/b/*.flac

?
just
Code:
mkdir -p /whatever/newdir
cp -pr /whatever/b /whatever/newdir

Hi thanks for the reply. That's not exactly what I'm after. I have a directory "b/" with flac, mp3 and wma files in sub folders say:
Code:
b/artist1/foo.mp3
              b/artist2/foo.wma
              b/artist3/foo.flac

I want to search for folders containing flac files in "b/" and mv the directory containing the flac files to my new folder "flac/". tbh I don't think i explained it very well the first time Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copying a Directory Structure to a new structure

Hi all Is it possible to copy a structure of a directory only. e.g. I have a file with the following entries that is a result of a find :- /dir1/dir2/file.dbf /dir1/dir2/dir3/file1.dbf /dir1/file.dbf I want to copy these to a directory and keep the structure however starting at a new dir... (8 Replies)
Discussion started by: jhansrod
8 Replies

2. UNIX for Advanced & Expert Users

MV files from one directory structure(multiple level) to other directory structure

Hi, I am trying to write a script that will move all the files from source directory structure(multiple levels might exist) to destination directory structure. If a sub folder is source doesnot exist in destination then I have to skip and goto next level. I also need to delete the files in... (4 Replies)
Discussion started by: srmadab
4 Replies

3. Shell Programming and Scripting

stop unix find on a directory structure after finding 1st occurrence

Hi, Has anyone tried to restrict Solaris 10 unix find on a large directory structure based on time to stop running after finding the first occurrence of a matching query. Basically I'm trying to build up a usage map of user workspaces based on file modification (week/month/3 months/year etc) and... (3 Replies)
Discussion started by: jm0221
3 Replies

4. Shell Programming and Scripting

How to create a directory structure with getting input from a file.

Hi How to create a directory structure with getting input from a file. I have file in that following lines are written. ./activemq-4.1.2/activemq-core-4.1.2.jar ./activemq-4.1.2/backport-util-concurrent-2.1.jar ./camel-1.4.0/apache-camel-1.4.0.jar ./camel-1.4.0/lib/activation-1.1.jar... (12 Replies)
Discussion started by: itsjoy2u
12 Replies

5. UNIX for Dummies Questions & Answers

create tar archive without preserving directory structure?

I am adding some individual files to a tar archive and would like them to be added to the archive without any directory hierarchy, even though the files themselves exist in levels of hierarchy. Unfortunately, tar seems to always preserve the directory hierarchy when it adds the files. Here is... (2 Replies)
Discussion started by: Special_K
2 Replies

6. Shell Programming and Scripting

Find directory and create backup

What I'm attempting to do is create a script that will do a search for directories that meet the following criteria: find . -name "config" -type d this comes back with: ./dir1/anotherDir/test_dir/config ./dir1/anotherDir/test_dira/config ./dir2/test/test_dir/config The results could... (4 Replies)
Discussion started by: cbo0485
4 Replies

7. Shell Programming and Scripting

find size, cp breaks directory structure

I'm using this now: find /some/path/with/sourcefiles -type f -size -7M -exec /bin/cp -uv {} /some/path/ \; but it doesn't preserve the directory structure, also I've tried it with find /some/path/with/sourcefiles -type f -size -7M -exec /usr/bin/rsync -auv {} /some/path/ \; but that doesn't... (9 Replies)
Discussion started by: unclecameron
9 Replies

8. Shell Programming and Scripting

How we can create the master file through shell to show the tree structure of the directory?

Can we create the master file that show the whole tree structure of the directory till a particular folder? Database that contains four sub repository Sybase,sql,oracle,mysql and sql and oracle contains two subrepostories Siebel and plsql and each repositories contains three folders... (1 Reply)
Discussion started by: rohit22hamirpur
1 Replies

9. Shell Programming and Scripting

Create Directory structure

Hello ; ) again Now I have my file like this : DIR2/DIR3 DIR2 DIR2/DIR3/DIR4/DIR5 I am looking for help to create a loop that will create the directory structure. I need something like this : If "DIR2" does not exist > Create IF "DIR2" exist already > check if onther "DIR"... (5 Replies)
Discussion started by: Aswex
5 Replies

10. Shell Programming and Scripting

Create a flat file and directory structure

Hi All, is there any work around to generate the file and directory structure like below at left side at Output? and exclude all file except .abc .txt Current Directory structure |-------------files |---------------Share |-----------------dir1 |-----------------dir2... (11 Replies)
Discussion started by: heros
11 Replies
CRIP(1) 						      Debian GNU/Linux manual							   CRIP(1)

NAME
crip - a terminal-based ripper/encoder/tagger tool SYNOPSIS
crip [options] DESCRIPTION
crip is a terminal-based ripper/encoder/tagger tool for creating Ogg Vorbis/FLAC files under UNIX/Linux. OPTIONS
-h, --help Print help and exit. -v, --version Print version of crip and exit. -e codec Encode to vorbis or flac (default = vorbis). -s media Specify the source media (default = CD). -g genre Specify the music genre (default = classical). -q [on/off] Classical-stype questioning (default = off). -m [on/off] Map european to american-only chars (default = off). -t [on/off] Trim leading/tailing silence (default = off). -n [on/off] Normalize the audio (default = off). -V voltresh Volume threshold for normalizing (default = 1.078) (only used when normalizing is enabled). -r [on/off] Remove files after encoding (default = on). -E editor Editor to use (default = sensible-editor). -u [on/off/both] Use editor to name the files (default = on) (as opposed to the command-line). -o flags Flags to pass to oggenc (default = '-q 4'). -f flags Flags to pass to flac (default = '--best --replay-gain'). -c flags Flags to pass to cdparanoia (default = '-v -z'). -d device CDrom device to read from (default = /dev/cdrom). -w [on/off] Skip the ripping (makes empty .wav files) (default = off) (useful if you already have the .wav files to encode). -p [on/off] Prompt to continue after ripping (default = off) (useful pause to edit .wav files before encoding). -x [on/off] Eject CD when done ripping (default = off) SEE ALSO
oggenc(1) flac(1) cdparanoia(1) AUTHOR
This manual page was written by Florian Ragwitz <florian.ragwitz@s2004.tu-chemnitz.de>, for the Debian project (but may be used by others). Debian Project 2009-04-06 CRIP(1)
All times are GMT -4. The time now is 12:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy