General :: Find A List Of Files That Are Named Duplicates ?
Jul 2, 2010How can I find a list of files that are named duplicates i.e. have same name but in different case that exist in the same directory?
View 7 RepliesHow can I find a list of files that are named duplicates i.e. have same name but in different case that exist in the same directory?
View 7 RepliesHow to build a list of files under a directory that may have any permissible characters in the name, that is anything except NUL? The only possible (?) bash data structure to contain a list of such names is an array because NUL cannot be used as a list item separator so no X-separated list can safely be used; there is no "X" that might not be part of a file name. OK -- but how to populate such an array? Here's what I've tried.
Code:
#!/bin/bash
# Set up test files
dir=$(mktemp -d "/tmp/${0##*/}.XXXXXX")
touch $dir/foo $dir/bar
[code].....
I know I can do find . -type f, but that includes binary file and I couldn't find a way to exclude them with find
View 4 Replies View RelatedHow to find and list files and directories present the current directory which were created in, say, years 2005, 2006, and 2009 and then move them to some other location, for example, /backup. Yes, I need to list them and move simultaneously. We can use:
Code:
find . -mtime n {};
but that n is troublesome for me to figure out files/directories created in years 2005, 2006, and 2009, for instance. Is there any way to match exactly by Year Value rather than calulating the "n" (days * 24 Hours)?
System Info:
SunOS 5.8 Generic_117350-06 sun4u sparc SUNW,Ultra-Enterprise
I use find / -name myfile to search files. But it will print out a very long list such as follow:
Code:
...
find: /var/empty/sshd: Permission denied
find: /etc/audit: Permission denied
find: /etc/httpd/conf/ssl.crl: Permission denied
find: /etc/httpd/conf/ssl.crt: Permission denied
[code]....
I need to delete all *.trc files that are older than 30 days and I am getting a "Argument list too long" error. There are other files that should not be deleted which is why I am using the "*.trc" and newer files need to be kept as well. I have seen other postings but they do not cover both of the conditions. Below are 2 of the many attempts at doing this but I cannot get this to work.
find *.trc -mtime +31 -print| xargs rm -f {}
find *.trc -mtime +31 -print -exec rm -f {} ;
I have a list of about 425 servers that are mostly redundant. I need to weed out the duplicate names so that I have a count of only the unique server hostnames. What is a good command to do this?
View 3 Replies View RelatedI have about 1TB of data to sort out and need a good GUI package to find and safely delete the duplicate files. I am running Ubuntu 10.04 amd_64. Would appriciate any thoughts on how to get it done.
View 8 Replies View RelatedIn linux, why are folders for configuration files always named *.d?
View 1 Replies View RelatedI have hard drive with several thousand photos. These photos are in different formats, some are tif some jpg some raw (cr2). These files are in dozens of directories. What I want to do is produce a list of all the files, in all of the directories, sorted by the file name (not sorting on the path), listing the location, file name, size and date created.
For instance I may have a file called photo1.jpg in /photos/pics/
I may also have a file called photo1.cr2 in /photos/misc/ and a file called photo1.tif in /photos/processed/summer/.
I would like a text file that would look like this:
/photos/misc/photo1.cr2 2536658 2010-07-09 13:17
/photos/pics/photo1.jpg 320046 2010-07-07 14:47
/photos/processed/summer/photo1.tif 234456689 2010-07-10 09:22
Of course I want it to do this for all of the photos. I pretty sure that there is a way to do this with a minimum amount of work. I have no problem with using the command line.
I'm trying to trim down Linux so that it fits on an appliance, and noticed that some related files in /bin have the exact same size:
Code:
Are those file duplicates, or are they just hard-linked, ie. there's really only one file in the flash memory but it looks like there are more than one? How can make sure?
i've been trying to get rid of unnecessary files on my kids' computer and just noticed that /home/.Trash-0 contains a duplicate of the file tree of the /home directory, including all of the current users' files and subdirectories. is this something i should leave alone? the machine is running slack 13.0 with KDE, and this is something i never noticed before.
View 4 Replies View RelatedMandriva 2009, BIND 9.5.0-P2. Named will start however I'm getting the above error as well as these:
14-Mar-2009 15:45:37.084 general: error: zone 0.in-addr.arpa/IN: loading from master file /var/lib/named/var/named/reverse/named.zero failed: file not found
14-Mar-2009 15:45:37.084 general: error: zone 0.0.127.in-addr.arpa/IN: loading from master file /var/lib/named/var/named/reverse/named.local failed: file not found
[code].....
Named shows to be running but with the errors above I know it's not running correctly. I also copied the above dir's over to /var/lib/named/var/lib/named which is where I 'believe' it's chroot'd at, though I could be wrong since I'm unfamiliar with chroot.
I have Red-Hat 5.6 , bind package and chroot installed, but i did not find the file named.conf in /etc !!!
View 3 Replies View RelatedHow do you find out what the bootloader configuration file is named? I am setting file permissions...would it be wise to set the entire boot directory to 700?
View 3 Replies View RelatedI've got a new hard drive, formatted it to ext3, and made a check for bad blocks using e2fsck.
It gave me this:
Quote:
I just would like to know where i can find how many bad blocks were found (perhaps one if it is using singular in sentence "Updating bad block inode."?), and what is/are the number(s) of located bad block(s).
I downloaded rpm so far but my only problem is I don't know what apps there are for it?
View 14 Replies View RelatedI want to search in many many files for a string.
I used find /archive/* -print0 | xargs -0 grep 'robert' -sl
Is there a simple method to do it ?
I am using Cent OS 5.5 and i want configure DNS, but while configuring bind i am getting below error.
#/etc/init.d/named restart Stopping named: [ OK ]
Starting named:
Error in named configuration:
/etc/named.conf:57: open: /etc/named.root.hints: file not found[FAILED]
I am trying to do a find/grep/wc command to find matching files, print the filename and then the word count of a specific pattern per file. Here is my best (non-working) attempt so far:
wc `find . ( -name "*.as" -o -name "*.mxml" ) -exec grep -H HeightResizableList {}` ;
Is there a way to specify to find that I only want text files (and not binary files)? Grep has an option to exclude binary files, so I thought find probably has a similar feature, but I've been unable to find it.
View 2 Replies View RelatedWhere can i find a list of cronjob return codes for linux/unix
View 1 Replies View RelatedWhere would i find the list of distribution codes.For example.Code:samba-32bit-3.4.2 -1.1.3.1.x8664.rpmIn above rpm file it is indicated that its release is 1.1.3.1 .The rpm is meant to be run for opensuse.Where would i get the linking of release number and In simple words How would i guess distribution by merely looking at rpm name?
View 2 Replies View RelatedI'm trying to do a
find /photos/* -type f -mtime +365
to find all my pictures that are over a year old, but I keep getting argument list too long. How can I view what all the results are, even if it just dumps it to a file that I have to open?
command to find list of table spaces in oracle in unix
View 1 Replies View RelatedI know how to search for normal files but can you let me know " How to search for 5 setuid files on the system. Also explain, for each file, why setuid mechanism is necessary for the command to function properly"
View 1 Replies View RelatedWould someone be able to point me in the direction to find a list of update releases for Redhat Linux v5?
View 1 Replies View RelatedI am trying to get this script to work. The purpose is to download a list of modules from the slax.org the list consist of a list of module numbers. What I am trying to do is Download the file or the file name corresponding to the number in the list.the list is comma delimited. this is what I have done so far and I am a stand still.
#!/bin/sh
# Wget script to retrieve modules from slax.org modules
#
# ----Begin of user defined values -----
# Path to wget
[code].....
I have some files located in /vol0/archives that has several files Eg:- arch_00001.arc , arch_00002.arc, arch_00003.arcI want to tar each of those files into separate tar ball by taking it garbing it file name sequence,Eg:- arch_00001.arc.tar.gz , arch_00002.arc.tar.gz, arch_00003.arc tar.gzhow do I define the tar command to go get those files and tar each file separately, As I mention above
View 2 Replies View RelatedI have a text file which is a list of all my contacts. So far i have only found software and commands which remove duplicates but i would like to remove all duplicates AND their original entries too so only contacts which have no duplicates are left.
View 10 Replies View Related