Sponsored Content
Top Forums Shell Programming and Scripting Deleting all files recursively from directories while ignoring one file type Post 302565007 by ahamed101 on Sunday 16th of October 2011 07:32:07 AM
Old 10-16-2011
Try this...

Code:
find . ! -wholename "*.mp3" ! -wholename "*.MP3" -delete

--ahamed
This User Gave Thanks to ahamed101 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Recursively deleting directories

Say I have a directory call test, and several directories nested in it, and several directories nested in them. And I want to remove all directories within "test" and its subdirectories that have the name "cvs", how can I do this? I tried rm -r cvs, but that only removed the top level direcotry... (4 Replies)
Discussion started by: mikeshank
4 Replies

2. UNIX for Dummies Questions & Answers

deleting files by type (symbolic links)

How do I delete just the symbolic links in a directory? I have files that I wish to keep that have similar names, length and date/time. Can I use file size? Thanks kyle (4 Replies)
Discussion started by: kryan_toolboy
4 Replies

3. UNIX for Advanced & Expert Users

Deleting older files of a particular type

hi This should be easy but i'm obviously missing something obvious. :) I'm looking to delete files from yesterday and older of extension .txt and there a range of subfolders with these files in them. The command runs but doesn't delete anything. SUSE 10. find /testfolder -maxdepth 2 -type f... (6 Replies)
Discussion started by: cmap
6 Replies

4. UNIX for Advanced & Expert Users

find -type d returning files as well as directories

Can anyone see why the following command returns all files and not just the directories as specified? find . -type d -exec ls -F {} \; Also tried find . -type d -name "*" -exec ls -F {} \; find . -type d -name "*" -exec ls -F '{}' \; -print Always returns all files :-\ OS is... (2 Replies)
Discussion started by: tuns99
2 Replies

5. UNIX for Dummies Questions & Answers

List directories and sub directories recursively excluding files

Hi, Please help me, how to get all the direcotries, its sub directories and its sub directories recursively, need to exclude all the files in the process. I wanted to disply using a unix command all the directories recursively excluding files. I tried 'ls -FR' but that display files as... (3 Replies)
Discussion started by: pointers
3 Replies

6. Shell Programming and Scripting

Recursively move directories along with files/specific files

I would like to transfer all files ending with .log from /tmp and to /tmp/archive (using find ) The directory structure looks like :- /tmp a.log b.log c.log /abcd d.log e.log When I tried the following command , it movies all the log files... (8 Replies)
Discussion started by: frintocf
8 Replies

7. Shell Programming and Scripting

Script for deleting files and directories when the file system reaches the threshold

Hi Can someone assist in writing a script. I have a filesystem named /sybase in my aix lpar. When this filesystem becomes 94% full all the files and directories under /sybase/logs should be deleted immediately. :confused: (7 Replies)
Discussion started by: newtoaixos
7 Replies

8. Shell Programming and Scripting

Shell script to copy particular file from directories recursively

I have directory path in which there are several sub directories. In all these sub dir there will be one env.cnf file. I want to copy this env.cnf file from each sub dir's and place them in destination path by creating same filename as sub dir_env.cnf. After copying env.cnf files from source... (4 Replies)
Discussion started by: Optimus81
4 Replies

9. Shell Programming and Scripting

Recursively Searcing file in the directories

i have directory dgf in the dgf( some other Sub-dir are there) 00 01 02 03 04 in all the Sub directory there is a SG.csv .. i want the scripts should run one by one Sub-dir and print the result for that particular Sub-dir ..then go to next Sub-Dir and print the result....... please... (6 Replies)
Discussion started by: Aditya.Gurgaon
6 Replies

10. Shell Programming and Scripting

Find file type recursively and move

Hello, I supposed that it was working fine but now I see that it's not working as expected. I am running under ubuntu14.04, trusty. My plan was to search folderA and all subdirectories and move any txt file to destination folder, folderB : find /home/user/folderA/ -type f -iname "*.txt"... (0 Replies)
Discussion started by: baris35
0 Replies
MP3::Tag::ParseData(3pm)				User Contributed Perl Documentation				  MP3::Tag::ParseData(3pm)

NAME
MP3::Tag::ParseData - Module for parsing arbitrary data associated with music files. SYNOPSIS
# parses the file name according to one of the patterns: $mp3->config('parse_data', ['i', '%f', '%t - %n - %a.%e', '%t - %y.%e']); $title = $mp3->title; see MP3::Tag DESCRIPTION
MP3::Tag::ParseData is designed to be called from the MP3::Tag module. Each option of configuration item "parse_data" should be of the form "[$flag, $string, $pattern1, ...]". For each of the option, patterns of the option are matched agains the $string of the option, until one of them succeeds. The information obtained from later options takes precedence over the information obtained from earlier ones. The meaning of the patterns is the same as for parse() or parse_rex() methods of "MP3::Tag". Since the default for "parse_data" is empty, by default this handler has no effect. $flag is split into 1-character-long flags (unknown flags are ignored): "i" the string-to-parse is interpolated first; "f" the string-to-parse is interpreted as the name of the file to read; "F" added to "f", makes it non-fatal if the file does not exist; "B" the file should be read in "binary" mode; "n" the string-to-parse is interpreted as collection of lines, one per track; "l" the string-to-parse is interpreted as collection of lines, and the first matched is chosen; "I" the resulting string is interpolated before parsing. "b" Do not strip the leading and trailing blanks. (With output to file, the output is performed in binary mode too.) "R" the patterns are considered as regular expressions. "m" one of the patterns must match. "o", "O", "D" With "o" or "O" interpret the pattern as a name of file to output parse-data to. With "O" the name of output file is interpolated. When "D" is present, intermediate directories are created. "z" Do not ignore a field even if the result is a 0-length string. Unless "b" option is given, the resulting values have starting and trailing whitespace trimmed. (Actually, split()ing into lines is done using the configuration item "parse_split"; it defaults to " ".) If the configuration item "parse_data" has multiple options, the $strings which are interpolated will use information set by preceding options; similarly, any interolated option may use information obtained by other handlers - even if these handers are later in the pecking order than "MP3::Tag::ParseData" (which by default is the first handler). For example, with ['i', '%t' => '%t (%y)'], ['i', '%t' => '%t - %c'] and a local CDDB file which identifies title to 'Merry old - another interpretation(1905)', the first field will interpolate '%t' into this title, then will split it into the year and the rest. The second field will split the rest into a title-proper and comment. Note that one can use fields of the form ['mz', 'This is a forced title' => '%t'] to force particular values for parts of the MP3 tag. The usual methods "artist", "title", "album", "comment", "year", "track", "year" can be used to access the results of the parse. It is possible to set individual id3v2 frames; use %{TIT1} or some such. Setting to an empty string deletes the frame if config parameter "id3v2_frame_empty_ok" is false (the default value). Setting ID3v2 frames uses the same translation rules as select_id3v2_frame_by_descr(). SEE ALSO The flags "i f F B l m I b" are identical to flags of the method interpolate_with_flags() of MP3::Tag (see "interpolate_with_flags" in MP3::Tag). Essentially, the other flags ("R m o O D z") are applied to the result of calling the latter method. perl v5.14.2 2009-12-30 MP3::Tag::ParseData(3pm)
All times are GMT -4. The time now is 03:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy