Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] "How to"



On Mon, May 12, 2014 at 5:35 AM, Stephen J. Turnbull <stephen@example.com> wrote:
 > > 1- You have 10,000 files, and you want to find
 > > duplicates. Sometimes, 1 file changes, or you add/remove one, so
 > > you want to find the changes quickly (let say daily). How?

git init; git add .; git commit; while true; do git status; sleep 86400; done

I am not sure tu understand (or maybe my question was not clear). Let say you have
./a/b/c/d/file1 and ./a/b/z/file2 in the tree. They are binary the same files. My question was to find them.

  > rsync -HavPS src/ dst/ --dry-run

I don't understand how this is supposed to work.

Neither.
 

  > > 2- These files have "meta-information" inside (let say date/time), that you
 > > can extract. how would you do?

GNU file(1) now handles metainformation fields in many file formats,
it would depend on exactly what you have.  (This is something I miss
with Apple's BSD file implementation.)

OK. I understand I was not clear. I was not asking about getting the meta-information, but using it.
Let say you have your 10,000  files, and a command which extracts the meta-information from
them (by the way,the "file" command is poor, as it only reads some data to "guess" the type of a file.
Give me for example the album name of an mp3 or the date of a picture: "file" just does not handle meta-information
deep enough for that).

The output of your "extractor" could be, after formatting, something like:
field1,field2,field3,filename

I need this metata, but it is so expensive to read the files (a couple of hours, most being spent on reading the metadata).

So we extracted the data, piped it, and saved in a file. Then? What about the next day, when you want to refresh?
Example: You copy ./un/deux/trois/foo to ./trois/deux/un/bar). The file metadata could be "mon,ton,son".
Therefore:
mon,ton,son,./un/deux/trois/foo
mon,ton,son,./trois/deux/un/bar

Many files contain "mon ton son" metadata. Some have "mon tes leur". I want the "leur" files, quickly.

This bunch of question is more about resolving a problem than a one-line script. So we will get many answers.

Regards,

br.
 

--
To unsubscribe from this mailing list,
please see the instructions at http://lists.tlug.jp/list.html

The TLUG mailing list is hosted by ASAHI Net, provider of mobile and
fixed broadband Internet services to individuals and corporations.
Visit ASAHI Net's English-language Web page: http://asahi-net.jp/en/



--
2 + 2 = 5, for very large values of 2.

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links