Skip to content

Verifying Files SHA-256 Checksums

Connecting to the Server

See the Set Up Putty "Signing In" section to connect to the server using Putty.

Verifying Files

  1. Navigate to the files directory where you uploaded your files. If you followed the previous tutorial, you should be in the home directory. To change to the files directory, type:

    cd files
    
  2. List the files in the directory to ensure your files are there:

    ls
    

    You should see your zip files listed. If you don't see them, make sure you uploaded them correctly using FileZilla.

    drwxrwxr-x 2 www-data sideload          0 Jul 10 02:07  ./
    drwxrwxr-x 2 www-data sideload          0 May 28 00:01  ../
    -rwxrwxr-- 1 www-data sideload   17828152 Jul 10 01:05  file1.zip*
    -rwxrwxr-- 1 www-data sideload         73 Jul 10 01:05  file1.zip.sha256*
    
  3. To verify the integrity of the files you uploaded, you can use the sha256sum command.

    sha256sum -c *.zip.sha256
    

    !!! Note: If you have multiple zip files, this command will check all of them at once. The bigger the file the longer this will take. There won't be any output while it's checking, but when it's done it will print the results. If everything is correct, you should see something like this:

    file1.zip: OK
    file2.zip: OK
    

    If there are any issues, it will print an error message indicating which file failed the check.

  4. If you see any errors, it means the file was corrupted during upload or the checksum file is incorrect. You will need to re-upload the files and checksums.

Decompressing the Files

  1. To unzip each file, you can use the unzip command:

    unzip file1.zip
    

    If there are spaces in the file name, you must use quotes around the file name:

    unzip "file with spaces.zip"
    

    You will get operation not permitted errors if you made the zip file on windows. This is due to the way Windows handles file attributes. You can ignore these errors, as they are not critical to the integrity of the files.

    Example output:

    Archive:  Big Brother.zip
        creating: Big Brother/
    chmod (directory attributes) error: Operation not permitted
        inflating: Big Brother/20250407-letter-to-deputy-attorney-general-blanche-oyer-2025-04-07-12-09-133.pdf  fchmod (file attributes) error: Operation not permitted
        (warning) cannot set modif./access times
            Operation not permitted
    
  2. change directory to the newly unzipped folder. As before if there are spaces in the folder name, you must use quotes around the folder name:

    cd "Big Brother"
    
  3. list the files in the directory to ensure they were unzipped correctly:

    ls
    

    You should see the files listed in the directory. If you don't see them, make sure you unzipped them correctly.

    Note

    Putty color codes the output of the ls command. With the standard settings, directories are blue, and files are green.

Additional commands

  • remove a file rm file1.zip
  • remove a directory rm -rf directory_name
  • create a directory mkdir directory_name
  • change directory cd directory_name
  • list files in a directory ll
  • view the contents of a file cat file1.zip.sha256

Next Steps

Now that you've verified the integrity of the files you uploaded, the hard part is done! You can now proceed to the next tutorial on Adding Items to add the files to Omeka S.

Keep an eye out for a note on where to find the files when attaching them to the item.