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
xcfa(1) 							   Manual: Xcfa 							   xcfa(1)

NAME
xcfa - GTK+ Implementation of the GNU shell command. SYNOPSIS
xcfa [OPTION]... [FILE]... -h, -help Displays this help section and exits. -version Displays the version of the program and exits. -verbose Activate verbose mode -systray Activate systray mode DESCRIPTION Interface contains console tools (cdparanoia, lame, oggenc, ...). Allows extraction of audio from DVD to .wav format. Allows extracting audio from CD to formats such as: wav, mp3, flac, ogg, m4a, mpc, ape. Allows encoding audio to: wav, mp3, flac, ogg, m4a mpc, ape. Allows encoding the .wma format to: wav, mp3, flac, ogg, m4a mpc, ape. Allows cutting of files. Allows management of common file-types before converting. Allows management of bitrates, frequencies, and channels. Allows creation of CD covers. Developed with Gtk2 and Glade and runs under the X window system on the GNU platform. USAGE
After the first launch, go to the Options tab and modify the settings to your liking. ADDING THE GPG KEY
With sudo: $ wget http://download.tuxfamily.org/xcfaudio/download/xcfaudio.key.asc -O - | sudo apt-key add - Without sudo: $ su root [Enter the password for root.] # wget http://download.tuxfamily.org/xcfaudio/download/xcfaudio.key.asc -O - | apt-key add - Another solution with root: # gpg --keyserver subkeys.pgp.net --recv 00B21603DD5C7A79 # gpg --export --armor 00B21603DD5C7A79 | sudo apt-key add - SOURCES.LIST Add the following lines to your [ /etc/apt/sources.list ] file for automatic updates: ## Xcfa for i386 and amd64 deb http://download.tuxfamily.org/xcfaudio/xcfa dev contrib deb-src http://download.tuxfamily.org/xcfaudio/xcfa dev contrib COMPLEMENTARY PACKAGE INSTALLATION
: See the Recovery and Complementary package installation guide: http://www.xcfa.tuxfamily.org/index.php?static2/xcfa CHANGELOG
Read the ChangeLog file and view the source code. AUTHOR
XCFA is developed by Claude Bulin (xcfa@tuxfamily.org) 4.3.1 Wed, 23 May 2012 xcfa(1)
All times are GMT -4. The time now is 08:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy