Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4079350
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:47:26+00:00 2026-05-20T17:47:26+00:00

When I run shasum from a several directories up on a single file, I

  • 0

When I run shasum from a several directories up on a single file, I get what I expect and ultimately want:

shasum 2010/Whitmore/The\ Astrophysical\ Journal\ 2010\ Whitmore.pdf
5da84767c2301f29ed3b7db7542167150fe63b8b  2010/Whitmore/The Astrophysical Journal 2010 Whitmore.pdf

When I run find from the same directory, it lists the files no problem:

find 2010/Whitmore/* | xargs -0
2010/Whitmore/The Astrophysical Journal 2010 Whitmore.pdf

I’ve been trying to write a bash script (or just a single line) that will return the individual shasum on each file found by find (there are lots) along with its filename. Piping the filenames to shasum does not work in any of the combinations I’ve tried.

I expect that the problem is with the spaces in the filename, but after Google searching, trying a number of find/xargs/ls combinations (and various combinations of what seemed to work for other people including -print0 flags), I still cannot figure out a way to run shasum on each file under these directories.

An example of the output I want (assuming there are 2 files under Whitmore) in case there’s a completely different way of getting this result:

find 2010/Whitmore/* | xargs -0 | shasum
5da84767c2301f29ed3b7db7542167150fe63b8b  2010/Whitmore/The Astrophysical Journal 2010 Whitmore.pdf
4d2b0a6da00473133b4617d67d9249da3d05cc19  2010/Whitmore/arXiv 2010 Whitmore.pdf

I am on a Mac OSX 10.6

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T17:47:26+00:00Added an answer on May 20, 2026 at 5:47 pm

    How about using the -exec option of find?

    find 2010/Whitmore/* -exec shasum {} \;

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I run this query: SHOW INDEX FROM `tbl_clients` I get back these: Table, Non_unique,
I run: ruby -I test test/unit/job_test.rb from my application root directory, and I get:
I run a query against a MySQL database to get total number of visits
I run into a problem using session in .php file i attached in jumi
I run my own business from home and started use Python 2 days ago.
I run this SQL statement select * from checkins where user_id in (SELECT friend_id
I run an ASP.NET Development Server (that came with MS Visual Studio 2010) on
run(/test.js) in mongo shell. i always get error run(/test.js) shell: started program /test.js sh2516|
I run a SaaS that allows free trials. Basically if you register you get
I run a wordpress blog. I want my blog to be available only for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.