Sponsored Content
Top Forums UNIX for Dummies Questions & Answers find -size -7M finds files, but won't cp them all Post 302483192 by methyl on Friday 24th of December 2010 08:39:50 AM
Old 12-24-2010
Maybe you have files in different subdirectories but with the same filename.
Try counting your unique names to test this theory.
Code:
find /somefolder -type f -size -7M -exec basename {} \; | sort | uniq | wc -l


I do hope that /someotherfolder is not a subdirectory of /somefolder .
This User Gave Thanks to methyl For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How can I find files by date or size from stout?

Hello all I wander if I make for example " ls -l " And it gives me all the files in the directory with the additional info like data size and privileges But what if I like to filter the stout result for example by date When I try to do: echo "`ls -l`" | grep "Jan 12" it gives me the... (2 Replies)
Discussion started by: umen
2 Replies

2. UNIX for Dummies Questions & Answers

Find total size for some files?

Hi, I'm newbie to Unix. I'd like to count the total size of those files in my directory by date. For example, files on this period 05/01/08 - 05/31/08. If possible can we count by byte instead of kb. if I use $ du - ks , it will add up all files in the dir. thanks, Helen (5 Replies)
Discussion started by: helen008
5 Replies

3. UNIX for Dummies Questions & Answers

find command returns files with spaces, mv won't work...

Hi guys. I am trying, to move files found with the find command... Script runs fine, until it reaches a file that contains spaces... Here is what i wrote up quickly. ROOTDIR=/apps/data SEARCH=$(find /data/HDTMPRestore/home/tmq/ -type f -print | grep Mods/Input/bck | cut -c19-) for i... (1 Reply)
Discussion started by: Stephan
1 Replies

4. UNIX for Dummies Questions & Answers

very urgent..need of a script which finds a file without the use of find command..hlp

im a beginner in shell scripting and i need a script which will find a file in a given path without the use of find or grep command.......i need some kind of code.....plzzz plzzzz help me......ive tried n searched every where but i couldn't find the solution for my particular problem..... (4 Replies)
Discussion started by: mishi
4 Replies

5. Shell Programming and Scripting

How to find size 0-4 bytes files?

Hi I need to find and delete 0-4 bytes size files in a folder. How can I achieve that? (1 Reply)
Discussion started by: kapilk
1 Replies

6. HP-UX

How can I find the size of files added to a folder after a particular date

Hi, I want to find the size of the files added to a folder after a certain date(say 1st of october), I know we can list the files which were created after a certain date , but is there anyway to find the total size of those files ? (3 Replies)
Discussion started by: alookachaloo
3 Replies

7. Shell Programming and Scripting

Find file size difference in two files using awk

Hi, Could anyone help me to solve this problem? I have two files "f1" and "f2" having 2 fields in each, a) file size and b) file name. The data are almost same in both the files except for few and new additional lines. Now, I have to find out and print the output as, the difference in the... (3 Replies)
Discussion started by: royalibrahim
3 Replies

8. Shell Programming and Scripting

Find duplicate files by file size

Hi! I want to find duplicate files (criteria: file size) in my download folder. I try it like this: find /Users/frodo/Downloads \! -type d -exec du {} \; | sort > /Users/frodo/Desktop/duplicates_1.txt; cut -f 1 /Users/frodo/Desktop/duplicates_1.txt | uniq -d | grep -hif -... (9 Replies)
Discussion started by: Dirk Einecke
9 Replies

9. Solaris

Find the total size of multiple files

If I have a number of files in a directory, for example, test.1 test.2 test.3 abc.1 abc.2 abc.3 and I need to find the total file size of all of the test.* files, I can use du -bc test.* in Linux. However, in Solaris, du does not have the -c option. What can I do in Solaris to get... (11 Replies)
Discussion started by: learnix
11 Replies

10. Shell Programming and Scripting

Finds all duplicate files

Hi, How would you write bash script that given a directory as an argument and finds all duplicate files (with same contents - by using bytewise comparison) there and prints their names? (6 Replies)
Discussion started by: elior
6 Replies
MB2MD(1)						      General Commands Manual							  MB2MD(1)

NAME
mb2md -- Converts Mbox mailboxes to Maildir format. SYNOPSIS
mb2md [-h] mb2md [-c] [-m] [-d destdir] mb2md [-c] [-s sourcefile] [-d destdir] mb2md [-c] [-s sourcedir] [-l wu-mailboxlist] [-R|-f somefolder] [-d destdir] [-r strip_extension] DESCRIPTION
mb2md Converts Mbox mailboxes to Maildir format. OPTIONS
-h Show summary of options. -c Use the Content-Length: headers (if present) to find the beginning of the next message. Use with caution! Results may be unreli- able. I recommend to do a run without "-c" first and only use it if you are certain, that the mbox in question really needs the "-c" option. -m If this is used then the source will be the single mailbox at /var/spool/mail/blah for user blah and the destination mailbox will be the "destdir" mailbox itself. -s sourcedir Directory, relative to the user's home directory, which is where the the "somefolders" directories are located. Or if directory starts with a "/" it is taken as a absolute path, e.g. /mnt/oldmail/user _OR_ A single mbox file which will be converted to the destdir. -R If defined, do not skip directories found in a mailbox directory, but runs recursively into each of them, creating all wanted folders in Maildir. Incompatible with '-f' -f somefolder Directories, relative to "sourcedir" where the Mbox files are. All mailboxes in the "sourcedir" directory will be converted and placed in the "destdir" directory. (Typically the Inbox directory which in this instance is also functioning as a folder for other mailboxes.) The "somefolder" directory name will be encoded into the new mailboxes' names. See the example in the USAGE file (see below). This does not save an UW IMAP dummy message file at the start of the Mbox file. Small changes in the code could adapt it for looking for other distinctive patterns of dummy messages too. Don't let the source directory you give as "somefolders" contain any "."s in its name, unless you want to create subfolders from the IMAP user's point of view. See the example in the USAGE file (see below). Incompatible with '-R' -d destdir Directory where the Maildir format directories will be created. If not given, then the destination will be ~/Maildir . Typi- cally, this is what the IMAP server sees as the Inbox and the folder for all user mailboxes. If this begins with a '/' the path is considered to be absolute, otherwise it is relative to the users home directory. -r strip_extension If defined this extension will be stripped from the original mailbox file name before creating the corresponding maildir. The extension must be given without the leading dot ("."). See the example in the USAGE file (see below). -l WU-file File containing the list of subscribed folders. If migrating from WU-IMAP the list of subscribed folders will be found in the file called .mailboxlist in the users home directory. This will convert all subscribed folders for a single user: /bin/mb2md -s mail -l .mailboxlist -R -d Maildir and for all users in a directory as root you can do the following: for i in *; do echo $i;su - $i -c "/bin/mb2md -s mail -l .mailboxlist -R -d Maildir";done USAGE
Please read the USAGE documentation (zless /usr/share/doc/mb2md/USAGE.gz). AUTHOR
This manual page was written by Noel Kothe noel@debian.org for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version pub- lished by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. MB2MD(1)
All times are GMT -4. The time now is 06:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy