New answers tagged

11

GNU find has an optimization which can be applied to find . but not to find . -type f: if it knows that none of the remaining entries in a directory are directories, then it doesn't bother to determine the file type (with the stat system call) unless one of the search criteria requires it. Calling stat can take measurable time since the information is ...


1

Where to export After having read https://bitbucket.org/padavan/rt-n56u/wiki/EN/UsingCron a good way to export configuration variables for both crontab and shell usage, is to insert the /opt related variables into /opt/etc/profile. Where and how to source To use ("source") the variables in cron it is suggested to: create a shell-wrapper script source ...


2

As is often the case on Solaris, /usr/bin/egrep is a legacy implementation that isn't POSIX-compliant, while /usr/xpg4/bin/egrep is a POSIX-compliant implementation and has little if anything beyond POSIX. Unless you're running legacy Solaris applications from the pre-POSIX days, make sure that /usr/xpg4/bin is before /usr/bin in your $PATH. GNU tools ...


0

If your ping does not support a useful SIGQUIT (AIX, Solaris), here's one workaround -- an infinite ping loop where each ping only fires off (e.g.) 10 pings, so that you can see intermediate results. while :; do ping -c 10 $HOST; done To stop it, Control-C may only kill the ping command; you may need to suspend and then kill the job (Control-z; kill %). ...


3

Since the documentation is fairly explicit, I would simply file a bug report. Comparing with BWK (one-true-awk or original-awk), it behaves as the documentation implies. If gawk's developer had some other reference implementation in mind for this detail, it should be documented. Testing gawk's -c (compatibility mode), it treats RS as described in the ...


3

The GNU project chose its recursive acronym for "GNU's Not Unix!" because GNU's design is Unix-like, but differs from it by being free software (while the original Unix was closed-source) and containing no original Unix code (i.e. has been entirely rewritten).


1

Apple doesn't install it (afaik), so you'll need Fink or MacPorts or homebrew or a manual install. Assuming a properly configured PKG_CONFIG_PATH for Fink or MacPorts or homebrew or the manual install, in this case MacPorts, pkg-config might indicate the presence of gsl (and, bonus, the various compiler flags to use). % echo $PKG_CONFIG_PATH ...


2

For Free and/or Open software logos are often based on animals. GNU stands for GNU is Not Unix and the match with the animal is quickly made. See http://www.gnu.org/ and http://www.gnu.org/gnu/gnu.html for more information.


5

The common name of the animal in GNU Project's logo is gnu and it is a species of antelope (also called wildebeest). The acronym GNU (Gnu's Not Unix) was introduced in 1983 in a text email by Richard Stallman. It can be assumed that the acronym GNU precedes the logo and its spelling became an inspiration for the design. The original logo (called A GNU ...


0

If you don't mind a multi-liner, you can work around it using sed and shell math with: # or however else you're getting the server-port section num=$(echo server-port=25555 | sed 's/server-port=//') v=$((v+1)) sed -i "s/server-port=25555/server-port=$v/" your-file-here Note the double-quotes around the sed expression; that's so that $v can be interpreted ...


2

I would suggest perl instead of sed for this task: perl -i -pe 's/(port=)(\d+)$/$1.($2+1)/e' filename


4

Not reproduced here? $ shuf -i1-10000000 > t.in $ sort -S50M -T. t.in --compress-program=lzop # ^z $ file sort* | tee >(wc -l) > >(grep -v lzop) 7 $ fg # ^c $ sort --version | head -n1 sort (GNU coreutils) 8.25 What I'm guessing the issue is, is due to failure to fork() the compression process due to the large mem size, and then falling ...


1

Is this GNU only? No. This rm behavior dates back around 40 years and has been standardized. What's the rationale for this behavior? From the 1st edition man page for rm: Removal of a file requires write permission in its directory, but neither read nor write permission on the file itself. BUGS rm probably should ask whether a ...


2

Since you asked three separate questions, I'll answer them separately. Your first question: Is this GNU only? I'm not sure that it's GNU only. It seems to be a feature of GNU Coreutils' rm that is also found in at least some other rm documentation. For example, according to some old documentation at opengroup.org for POSIX rm: If file is not ...


2

plain user You might wish to protect a file from your own deletion/modification. A quick way is to chmod 000 foo (or chmod -w foo). However, this is of no use if you choose to delete it unwillingly. So rm command will inform you (as non root), if this is the case, that's why there is a confirmation request. root when running as root, an specially during ...



Top 50 recent answers are included