diff --git a/configs/fstab b/configs/fstab index 8df91af..7173cba 100644 --- a/configs/fstab +++ b/configs/fstab @@ -1,2 +1,3 @@ +#Example #[SRC] [DST] [FS TYPE] [OPTIONS] /dev/sda1 /boot ext4 rw diff --git a/src/coreutils/nproc/build.sh b/src/coreutils/nproc/build.sh new file mode 100755 index 0000000..3b2db38 --- /dev/null +++ b/src/coreutils/nproc/build.sh @@ -0,0 +1,2 @@ +#!/bin/sh +echo ./*.c $CFLAGS $OUTPUT | xargs $CC diff --git a/src/coreutils/nproc/nproc.c b/src/coreutils/nproc/nproc.c new file mode 100644 index 0000000..a54904e --- /dev/null +++ b/src/coreutils/nproc/nproc.c @@ -0,0 +1,11 @@ +#include +#include + +int main(void) { + long count = sysconf(_SC_NPROCESSORS_ONLN); + if (count <= 0) + count = 1; + + printf("%ld\n", count); + return 0; +}