We’re rewarding the question askers & reputations are being recalculated! Read more.

Hot answers tagged

151

GNU will not adopt something as a project unless the developers agree to certain stipulations which bind all official GNU projects. Currently the Linux kernel probably does not fit these restrictions, and there is nothing for Linus Torvalds, kernel.org, et al. to gain from placing themselves under the GNU umbrella, and a lot to lose -- the aforementioned ...


93

It appears that you are confusing two very different parts of the OS. It's understandable, because they are often referred to interchangably, but it's technically incorrect, so your question is based on a faulty premise. In order to fully explore and hopefully answer the question that you likely want to ask, a short history lesson is needed. First, there ...


77

There is much documentation and discussion on this on the net. The short answer that there are deep ideological differences between the GNU project and the Linux kernel projects, which gets in the way of a possible unification. The focus of the FSF, the organization behind the GNU Project, is on ideological purity with respect to the idea of free software. ...


71

POSIX defines standard error as for writing diagnostic output This doesn't limit its use to error messages only. I would consider progress information as diagnostic output, so it belongs on standard error.


63

GNU Info was designed to offer documentation that was comprehensive, hyperlinked, and possible to output to multiple formats. Man pages were available, and they were great at providing printed output. However, they were designed such that each man page had a reasonably small set of content. A man page might have the discussion on a single C function such ...


41

The reason the Info system was invented is necessity, but I guess "laziness, hubris and impatience" is an equally good explanation. The point of the GNU project was to develop a freely modifiable and freely distributible operating system and tools. The traditional Unix man system was based on the nroff/troff document formatting system from Bell Labs, which ...


40

GNU sed accepts an optional extension after -i. The extension must be in the same argument with no intervening space. This syntax also works on BSD sed. sed -i.bak -e '…' SOMEFILE Note that on BSD, -i also changes the behavior when there are multiple input files: they are processed independently (so e.g. $ matches the last line of each file). Also this won'...


40

In ksh, Bash, Zsh, Yash or BusyBox sh: [ "$RANDOM" -lt 3277 ] && do_stuff The RANDOM special variable of the Korn, Bash, Yash, Z and BusyBox shells produces a pseudo-random decimal integer value between 0 and 32767 every time it’s evaluated, so the above gives (close to) a one-in-ten chance. You can use this to produce a function which behaves as ...


38

As far as I can tell, the use of -- as end-of-options-marker starts with sh and getopt in System III Unix (1980). According to this history of the Bourne Shell family, the Bourne Shell first appeared in Version 7 Unix (1979). But it didn't have a way for set to separate options from arguments. So the original Bourne shell could do: set -e - turn on exit-on-...


37

The [ binary residing under the /bin tree in many GNU/Linux distributions is not something to be alarmed off. At least in my Fedora 19 it is a part of the coreutils package, as demonstrated below: $ rpm -qf /bin/[ coreutils-8.21-13.fc19.x86_64 and is a synonym for test to allow for expressions like [ expression ] to be written in shell scripts or even ...


35

I am quoting a comment by Richard Stallman, regarding the decision to roll with the Hurd rather than Linux. People sometimes ask, ``Why did the FSF develop a new free kernel instead of using Linux?'' It's a reasonable question. The answer, briefly, is that that is not the question we faced. When we started developing the Hurd in 1990, the ...


34

From the ping manpage (emphasis mine): When the specified number of packets have been sent (and received) or if the program is terminated with a SIGINT, a brief summary is displayed. Shorter current statistics can be obtained without termination of process with signal SIGQUIT. So this will work if you're fine with your stats being slightly less ...


30

That is a difficult question to answer. First "Unix Like" or "*nix" usually means POSIX. All the systems you listed are POSIX systems. POSIX is a set of standards to implement. Now for the harder questions. GNU isn't really an OS. It's more of a set of rules or philosophies that govern free software, that at the same time gave birth to a bunch of tools ...


30

GNUPG has a trust database stored at ~/.gnupg/trustdb.gpg You can backup this trust database using the --export-ownertrust option: gpg --export-ownertrust > file.txt If you exported your secret keys and import them later into a new environment, the trust database is no longer present. However, this is easily remedied: gpg --edit-key user@useremail....


29

The Ubuntu bsdtar is actually the tar implementation bundled with libarchive; and that should be differentiated from classical bsdtar. Some BSD variants do use libarchive for their tar implementation, eg FreeBSD. GNUtar does support the other tar variants and automatic compression detection. As visualication pasted the blurb from Ubuntu, there are a few ...


28

The term "userland" can refer to many things in different contexts, but here I interpret "GNU userland" vs "BSD userland" as the default, minimum set of programs that come with a distribution. The big main difference is that the two userlands start with completely different source code. GNU cat source code NetBSD cat source code. Just from that simple-in-...


28

chmod: change file mode bits Usage (octal mode): chmod <octal-mode> files... Usage (symbolic mode): chmod <references><operator><modes> files.. references is a combination of the letters ugoa, which specify which user's access to the files will be modified: u the user who owns it g other users in the file's group o ...


28

You can find the HTML version of all the editions of POSIX 2008 online: original: http://pubs.opengroup.org/onlinepubs/9699919799.2008edition/utilities/rm.html TC1 (2013 edition) http://pubs.opengroup.org/onlinepubs/9699919799.2013edition/utilities/rm.html TC2 (2016 edition) http://pubs.opengroup.org/onlinepubs/9699919799.2016edition/utilities/rm.html That ...


27

Posix defines the standard streams thus: At program start-up, three streams shall be predefined and need not be opened explicitly: standard input (for reading conventional input), standard output (for writing conventional output), and standard error (for writing diagnostic output). When opened, the standard error stream is not fully buffered; the standard ...


25

sda is the device name. /dev/sda is the device path. Think of /sbin/fdisk, fdisk is the file name, while /sbin/fdisk is the file path.


25

Non-standard solution: [ $(date +%1N) == 1 ] && do_stuff Check if the last digit of the current time in nanoseconds is 1!


24

Strictly speaking, the POSIX specification for sed requires a newline after a\: [1addr]a\ text Write text to standard output as described previously. This makes writing one-liners a bit of a pain, which is probably the reason for the following GNU extension to the a, i, and c commands: As a GNU extension, if between the a and the newline there is ...


22

@rob is right. GNOME is technically an official GNU project. However, there is a lot of interesting history. Let's roll back the clock It's 1996. There are no desktop environments. Users and sysadmins assemble environments from a hodge-podge of programs. Different window managers, different applications, maybe a dock. There are two major toolkits on the ...


21

GNU is a recursive acronym, GNU's Not UNIX It was chosen because: The name “GNU” was chosen because it met a few requirements; first, it was a recursive acronym for “GNU's Not Unix”, second, because it was a real word, and third, it was fun to say (or Sing). See this GNU webpage for more historical information on the the name.


21

No, each kernel implements its own features in its own way. There's a large amount of POSIX compatibility but once you get out of that the executables need to be compiled with the kernel mechanisms already in place. Many projects contain source code that only gets compiled if you explicitly say that you're compiling for FreeBSD or Linux. That's essentially ...


21

An alternative to using $RANDOM is the shuf command: [[ $(shuf -i 1-10 -n 1) == 1 ]] && do_stuff will do the job. Also useful for randomly selecting lines from a file, eg. for a music playlist.


20

I would be inclined to think that dir is there just for backwards compatibility. From GNU Coreutils: dir is equivalent to ls -C -b; that is, by default files are listed in columns, sorted vertically, and special characters are represented by backslash escape sequences. By the way, ls doesn't colorize the output by default: this is because most distros ...


20

As the Wikipedia page says, TeXinfo was designed as the official documentation of the GNU project by Richard Stallman. It is a set of macros on top of TeX, and was designed for writing software manuals. I think Stallman considered man pages inadequate for the task. Two advantages Texinfo has over man pages is that it is hyperlinked, and second, that it is, ...


20

The explicit goal of the GNU project is to provide a complete open source/libre/free operating system. Are there any GNU distributions which use only these packages -- i.e. a "pure" GNU operating system that runs on only GNU packages? There is a reference here to an official sounding GNU binary distro based on Hurd which "consists of GNU Mach, the Hurd, ...


20

That last example should have clarified things for you: timezones. $ TZ=UTC date -d "2019-01-19T05:00:00Z - 2 hours" +%Y-%m-%d_%H:%M:%S 2019-01-19_03:00:00 $ TZ=Asia/Colombo date -d "2019-01-19T05:00:00Z - 2 hours" +%Y-%m-%d_%H:%M:%S 2019-01-19_08:30:00 As the output clearly varies by the timezone, I'd suspect some non-obvious default taken for a time ...


Only top voted, non community-wiki answers of a minimum length are eligible