Code Monkey home page Code Monkey logo

Comments (6)

tciuro avatar tciuro commented on July 24, 2024

+1

I just saw that too.

from couchdb-dump.

rajington avatar rajington commented on July 24, 2024

+1

if the error is because of nproc, you can use sysctl -n hw.ncpu

from couchdb-dump.

dalgibbard avatar dalgibbard commented on July 24, 2024

Ah nice one; I don't have a Mac, so its pretty fiddly for me to establish
what alternative commands there are. I'll check if sysctl is portable to
Linux too.

The other error is surrounding one of the flags I'm passing to du to work
out available disk space; could I trouble you to have a peek and see if
there's a Mac equivalent?

If there's no easily portable options, I may need to have two commands,
split by identified system type (worst case scenario)- what's the simplest
way of identifying a Mac on command line?

On Thu, 16 Apr 2015 21:55 Rajarshi Nigam [email protected] wrote:

+1

if the error is because of nproc, you can use sysctl -n hw.ncpu


Reply to this email directly or view it on GitHub
#20 (comment)
.

from couchdb-dump.

nicktacular avatar nicktacular commented on July 24, 2024

Identify OS X using uname -a | grep -i darwin:

[zero]~→ uname -a | grep -i darwin
Darwin zero.local 14.1.0 Darwin Kernel Version 14.1.0: Thu Feb 26 19:26:47 PST 2015; root:xnu-2782.10.73~1/RELEASE_X86_64 x86_64

For du instead of using -BK use just -k and you don't need to sed out K since it's not in the output:

[zero]~→ du -P -k tracks.json 
44  tracks.json

For the number of CPUs (as @rajington says) you can use sysctl like so:

[zero]~→ sysctl -n hw.ncpu
4

In either case, you could create a few bash functions for this. I'd offer a PR but not any time at the moment to do so.

Thanks for your great tool! I use this on Linux a lot now.

from couchdb-dump.

danielebailo avatar danielebailo commented on July 24, 2024

Darren,
sorry for coming back to you so late.
It looks like NIck Lyin already solved the issue, isn't it?

bye
Daniele

Daniele

http://www.danielebailo.it/

2015-04-16 23:49 GMT+02:00 Darren Gibbard [email protected]:

Ah nice one; I don't have a Mac, so its pretty fiddly for me to establish
what alternative commands there are. I'll check if sysctl is portable to
Linux too.

The other error is surrounding one of the flags I'm passing to du to work
out available disk space; could I trouble you to have a peek and see if
there's a Mac equivalent?

If there's no easily portable options, I may need to have two commands,
split by identified system type (worst case scenario)- what's the simplest
way of identifying a Mac on command line?

On Thu, 16 Apr 2015 21:55 Rajarshi Nigam [email protected] wrote:

+1

if the error is because of nproc, you can use sysctl -n hw.ncpu


Reply to this email directly or view it on GitHub
<
#20 (comment)

.


Reply to this email directly or view it on GitHub
#20 (comment)
.

from couchdb-dump.

dalgibbard avatar dalgibbard commented on July 24, 2024

Yeah sort of; I'll raise a merge for it in a while maybe - I'd forgotten about it tbh :)

from couchdb-dump.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.