Rsync frustration of doing the simplest of things

  • You need to use the > before the output file. It redirects stdout in what ever file you name after.

    Should have re-edit my post right afterwards, that already tried that and still no files been created anywhere. Based upon my current directory can you type how exactly should have written it ?

    • Offizieller Beitrag

    according to the man page the -s option is suppressing error messages
    https://linux.die.net/man/1/md5deep


    I would test first without -s option and without redirection to a file on a small directory tree. If that works, go from there.

  • I would test first without -s option and without redirection to a file on a small directory tree. If that works, go from there.

    Which argument redirects. dir1sums thought to be the name of file to be created


    Edit: I run it without -s and the outcome wa

    I can 't find/see the /root/dir1sums....what am I suppose to do know (I understand the point is to create 2 files one for the source and the other for destination and somehow compare them. The prodecure I don't know)


    Also in cli I can t navigate to /root like cd root or cd /root/ I can only nano /root/dir1sums and then i get to that file where I see the hashes of its file not a sum of all of them


    Tried running the command for desdtination also in order to be created the second has file with the name dir2sums and even though it hashed the files got the mesage /root/dir2sums: No such file or directory (it is supposed to create it not find it)

    • Offizieller Beitrag

    As mentioned by @getName() you have to redirect the output with ">"


    md5deep -r "/srv/dev-disk-by-label-Music Data Base/Celtic_Folk" > dir1sums


    If you execute the command from you home directory (~) you should find the file dir1sums in that directory.

    • Offizieller Beitrag

    Once this is working read again: https://www.unixtutorial.org/u…aring-directories-in-unix


    And then have md5deep read that file and compare the second directory to it:
    md5deep -r -X dir1sums /dir2If there is no output that means the directories are identical. Otherwise it will display the hashes of files that are different. Thus the comparison has been accomplished.


    No second file. Just a second directory to compare the results from the first directory.

  • And then have md5deep read that file and compare the second directory to it:
    md5deep -r -X dir1sums /dir2If there is no output that means the directories are identical. Otherwise it will display the hashes of files that are different. Thus the comparison has been accomplished.

    I have read the mini-instructions twice .


    I tried the way it mentions the command to be typed

    Code
    md5deep -r -X dir1sums /dir2


    and it runs like both dirs have no difference. I say ok and go to the second directory and delete 2 files. Run again md5deep -r -X dir1sums /dir2 and still no output. So I dont think is very or reliable at all.

    • Offizieller Beitrag

    You have to replace "dir2" with the path to your second directory.


    Maybe something like
    "/srv/dev-disk-by-label-backup/Celtic_Folk"


    Of course I am just guessing here, as I do not know the path of your second directory.

  • Of course I am just guessing here, as I do not know the path of your second directory.

    You re right i just miss-paste . Whole procedure goes like this


    Code
    ~# md5deep -r -s "/srv/dev-disk-by-label-Music Data Base/Metal/Avant-garde_Experimental_Industrial_Post"> dir1sums
    ~# md5deep -r -X dir1sums /srv/dev-disk-by-label-Muz/MusicDataBase/Metal/Avant-garde_Experimental_Industrial_Post

    and nothing happens changing or not files in directory 2. The dir1sums indeed is being created in /root/dir1sums and inside has hash hexabit whatever this is codes

    • Offizieller Beitrag

    md5deep -r -X dir1sums /srv/dev-disk-by-label-Muz/MusicDataBase/Metal/Avant-garde_Experimental_Industrial_Post

    should this be


    md5deep -r -X dir1sums "/srv/dev-disk-by-label-Muz/Music Data Base/Metal/Avant-garde_Experimental_Industrial_Post"?
    Or do you have one directory with spaces and one without?


    Before it was "/srv/dev-disk-by-label-Music Data Base/Celtic_Folk"


    Very confusing and impossible to follow.

  • Or do you have one directory with spaces and one without?

    Exactly.... they differ as they are both shared (one disk in internal other is external), and one has spaces thats why the " " they other is connected by - and _


    I am running it for second time this time in another directory that s why this time isnt Celtic_Folk (this directory was not inside metal genre its outside a category by it self).


    But until now after running the compare command I ahve 10 mins waiting no outcome and the belwo line in cli is empty and can type things jsut not in root directory (I dont know if the command is still running)


    Edit1....and it finished without messages as it should be ... lets see the second time running the compare command with 2 files missing from the destination folder if its going to find/report them (or it doesnt work this way it needs both files and the one to be altered in order to show up the difference)


    Edit2....finished again and was unable to find the differences... Its like it isnt working

  • Well, I am not too sure what is happening there, can you cat the dir1sums please?
    You can still use rsync with checksums in a second copy.
    The second copy will only actually alter files, if a checksum differed.
    Md5deep however should be very very reliable, so propably something else is going on. Thinking about it, I am not sure, if it posts missing files at all. Try altering one md5sum in dir1sums and let it check against the files. There are a lot of usecases, where it makes sense to only check existing files, not for the existence itself.

  • Maybe use tail instead, cat might be a very large output.


    tail: cannot open '/root/dir1sums' for reading: No such file or directory...told you I can't understand why its so difficult to navigate to that damn file.


    At the same time with cloud commander you can see the file


    Probably you want to see this

  • Ok, I am not sure if you are still trying to fix this, but if so some further advice.
    In general keep in mind, that the file naming on modern filesystems is case sensitive (different with fat type fs).
    What makes me wonder is that your Dir1sums has a 0b size, but you can open this and read lines. Is this mounted async, some tmpfs or some fuse fs (like mergefs) ?
    Please provide output of the following:
    cat /etc/fstab
    df - hT
    ls -ltra /root/


    Do you know how to navigate trough a fs in terminal? ls and cd are the most important commands. Also use tab when writing, this way you get some autocompletition and you dont have to write the filenames all by your own with the possibility of mistakes there.

  • Do you know how to navigate trough a fs in terminal? ls and cd are the most important commands. Also use tab when writing, this way you get some autocompletition and you dont have to write the filenames all by your own with the possibility of mistakes there.

    Yes i know all the above thanks for mentioning.


    I will edit back again and post results as soon I m home again.


    So......


    cat /etc/fstab


    ls -ltra /root/


    df - hT


    df: -: No such file or directory
    df: hT: No such file or directory

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!