@Don Cragun
This is why I might cut the first 64 digits, because it looks a bit too nasty with the sha256sum, imagine sha512sum.
as always learning
@Aia for heavens sake, sed coming up......yeah, I will train this....thanks, I will report later.
harsh.....
---------- Post updated 09-07-15 at 06:01 PM ---------- Previous update was 09-06-15 at 10:35 PM ----------
@Aia The quadcore works a lot with the xargs -0 version right now. I just started to read the first chapter of 63 for sed, so sorry, that this is one of the commands I hoped to avoid until now. First try results in one single file, the destination.mp3 in this case. hm....
@Don Cragun
one directory, 252 subdirectories, nearly 5000 tunes, different versions, kbps, length, put them in one folder.
My script from last year, well lets call it a snippet of a script, was hopping from one directory as the outset to move (cp) to destination. Then I took the destination to hop to the third new directory and so on. Surely not a hundred times, but it got a result of 30GB for snippets of tunes, one second of hihat, 3 seconds of openhihat, all together 26k files, or items. Therefore I used this construction
and guess what, it worked.
And I am aware, that the real 19 inch server rack is not sorted like this, they would put any file listed in alphabetical order, for each letter one drive, may even for different formats (.jpeg or .png) different mirrors. It is just to have it in one directory and later on on a pluggable drive.
@Aia It stopped after 575 songs, unable to call stat for "-" (no underliner), could not find directory. Running now version two, with sed. That goes well as root, I'll try it as well as user. Resulting in 4429 tunes, 22 GB. Orignally it was 22.9 GB. Now I could work with diff or midnight commander.
Last edited by 1in10; 09-07-2015 at 06:45 PM..
Reason: resulting in less
I am very glad that the command line:
is working for you. Assuming that the /tmp/runner;txt in the above is a typo and that what you really used was /tmp/runner.txt AND assuming that the cp completes successfully; are you aware that the above is equivalent to the three completely independent command lines:
which means, as I said before, that all of the stuff that you're doing with the checksums has absolutely no affect on the set of files copied to your destination directory.
Note also, that unless some of your song titles contain more than 62 "words", the second command line is equivalent to the slightly simpler:
which sorts with the checksum as the primary sort key and the song title as the secondary sort key. But, if some titles do have more than 62 "words" and you use sort -k 64, your primary sort key is the 63rd "word" in your song titles, the secondary sort key is the checksums, and the tertiary sort key is the rest of the song title. I do not understand why the 63rd word in your song titles should be so significant???
Presumably the reason why the size of the destination directory is smaller than the size of the source file hierarchy is because:
the amount of space consumed by the directories in the source file hierarchy is larger than the amount of space consumed by the single destination directory, and
for each set of files in the source hierarchy with the same final pathname component name, only one element in each set is included in the destination directory.
This User Gave Thanks to Don Cragun For This Post:
@Don Cragun: You are right, not only the typing error of " ; " but the length of the field for the checksum. Browsing the result there are no hidden files like
, that tiny thumbnails, and probably some links. So thanks a lot to
@Aia and you,
even pushing me into the streamline editor. I will probe it some more times with diferent values. Really thanks a lot for your attention.
Last edited by 1in10; 09-08-2015 at 09:26 AM..
Reason: spelling and quoting
Dear Experts,
I have some directory structure something like follows. I would like to cut portion of it. Would you please help me? I have to run this on several sql's. The directory path is dynamic. I have cut what comes after first "sql" string.
Input:... (3 Replies)
I have a file, in Windows, called php_0.27.tar.gz and want to extract it to
C:\Program Files\PHP\script through Cygwin using this command:
tar -xf php_0.27.tar.gz -C /Program Files/PHP/script But I got an error saying:
tar: Files: Not found in archive
I tried this command too:
... (8 Replies)
Hi,
I would like to achieve below requirement,
I have a directory "/mydir" and I want to automatically sync/copy all the content of /mydir directory to "/yourdir" directory all the time.
meaning, if some application creates a file in /mydir, it supposed to be copied/available in "/yourdir"... (4 Replies)
Hello,
I need to write a script to check directory size on a linux server.
I do not have access to some directories Inside the directory tree so I've got some warning in the output that say :
du : cannot read directory ....
Could you please help me. I did try Inside of my script to... (2 Replies)
I need to fit in a module in my Korn Shell script which would extract file_archive.tar.gz residing in the folder /apps/Test of my local machine into a folder /global/ in a remote machine server1.
Please help me on this regard.
Thanks
Kumarjit. (2 Replies)
Hello everyone,
I am trying to make a script in KSH that will zip an entire directory but leave out one file in that directory. I then need to send that zipped directory to another UNIX box. I am new to UNIX and would appreciate a good template to study from. (3 Replies)
Hi guys. I'm doing some bash scripting and have run into a snag.
Say I have the path:
/home/one/two/three/
All I need is the 'three' while making a filename.
Is there an easy way to do this? I've tried using grep (because I'm that smart.) cut (as I'm unable to tell how many fields there... (3 Replies)
Hi Everyone,
It would be helpful if someone helps me on this.
Requirement:
I have a directory which includes different types of files(for example *.java,*.class),but not restricted for only these types. I need to find the same types of file extensions from its directories and subdirectories... (3 Replies)
Hi
I'll be getting a directory path as the input to the script.
E.g. 1 abc/fsg/sdfhgsa/fasgfsd/adfghad/XXX/fhsad
e.g. 2 sadfg/sadgjhgds/sd/dtuc/cghcx/dtyue/dfghsdd/XXX/qytq
This input will be stored in a variable.
My query is how to extract the field in a variable VAR which occurs... (15 Replies)