9 karma · joined Jan 22, 2017 (9y ago) · 14 submissions
comment 7y ago · link · parent
The architecture does not have to be two's-complement. The value of the expression (size_t)(-1) will always be SIZE_MAX, the largest number that can be represented in the size_t type. The bit pattern may change depending on the architecture, but the value shall equal to SIZE_MAX.
comment 9y ago · link · parent
If no expression is present, -print shall be used as the expression. Otherwise, if the given expression does not contain any of the primaries -exec, -ok, or -print, the given expression shall be effectively replaced by: ( given_expression ) -print
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/fi...
comment 9y ago · link · parent
comment 9y ago · link · parent
find /path/to/dir -type f -printf "%s\n" | awk ' { s += $0 } END { print s " bytes" } '
The find command has much powerful file filtering capabilities than that of the ls command and works better with weird characters in filenames.