Tag Info

Hot answers tagged

112

su - invokes a login shell after switching the user. A login shell resets most environment variables, providing a clean base. su just switches the user, providing a normal shell with an environment nearly the same as with the old user. Imagine, you're a software developer with normal user access to a machine and your ignorant admin just won't give you root ...


38

Two of the most important UNIX books, The UNIX Programming Environment and The C Programming Language both refer to it as minus. Unix Programming Environment, page 13: Options follow the command name on the command line, and are usually made up of an initial minus sign (-) and a single letter. C Progamming Language, 2nd Edition, page 116: A common ...


32

I've never seen anyone say "minus" outside of a math scenario (to mean subtract), "dash" is appropriate and will be more common, this isn't a Unix thing, this was just this one person. We do have other lingo though, e.g. #! is pronounced shebang. Here's a link to the current Jargon File for ASCII and how they're said


22

I learned Unix in the AT&T System V days (1990), and it went like this: rm -rf /bin/nessus-fetch.rc was spoken as: arr emm minus arr eff slash bin slash nessus dash fetch dot rc where a minus was a argument indicator and a dash was part of a directory or file name I've heard plenty of minus in my time, and usually the dash people were newbies, ...


21

su - logs you in completely as root, whereas su makes it so you are pretending to be root. The most obvious example of this is that ~ is root's home directory if you use su -, but your own home directory if you use su. Depending on your system, it may also mean differences in prompt, PATH, or history file. So if you are part of a team administering a ...


13

Non-executable shared objects work fine, but libraries marked executable may also be runnable as standalone programs. So, what's the point of setting this x? None, unless you want them to emit version or other info Must all library packagers do that? No What will happen if I dlopen() a shared library that has 0644 permissions? You'll get ...


12

Well, for me "minus" is more natural, probably because I am not a native english speaker. My native language in Hungarian, and minus = minusz, but hyphen = valasztojel, obviously "minus" is easier and shorter. However I live in Romania, and minus = minus, but hyphen and dash does not even have a one-word translations, so they would be very tedious to use.


10

I would only call .sh something that is meant to be portable (and hopefully is portable). Otherwise I think it's just better to hide the language. The careful reader will find it in the shebang line anyway. (In practice, .bash or .zsh, etc… suffixes are rarely used.)


9

I believe it's /usr/local/bin/ - it's for installing custom, not maintained by package manager executables.


9

I would say that no "good practices" for file extensions exist, strictly on a technicality: Unix/Linux/*BSD file systems don't support extensions per se. What you are calling an extension is merely a suffix of a single file name. That's different that the VM/CMS, VMS, MS-DOS and Windows file systems and OSes where a special spot in the inode-moral-equivalent ...


8

rc is actually a fossil of an old batch facility, a runcom; the following is a quote from Brian Kernighan and Dennis Ritchie: There was a facility that would execute a bunch of commands stored in a file; it was called runcom for "run commands", and the file began to be called "a runcom". rc in Unix is a fossil from that usage. .d is a standard method ...


7

There is no hard and fast rule but each distribution has its own logic behind putting things where they do. Generally, /bin is used for system binaries, /usr/bin for default applications that comes with the distribution and /usr/local/bin for things that are installed outside of the normal distribution. You can add a X11 to any of those for X11 binaries ...


7

The only time I use or hear minus instead of dash is when using chmod to remove a certain permission, e.g. chmod -x script.sh as the action in question can be considered subtraction.


7

Under HP-UX, shared libraries are mapped into memory using mmap(), and all memory pages in the system have protection bits which are coupled with the kernel and processor hardware's memory page protection mechanisms. In order to execute the contents of any page of memory on the system, that page must have PROT_EXEC set - a useful feature to prevent data ...


6

The organization of the system files is up to the operating system maker. Linux distributions by and large follow the Linux filesystem hierarchy standard (FHS). As a user or system administrator, the FHS (and your distribution's additional conventions) may occasionally be useful if you need to locate a file or if you want to understand a file's role given ...


6

For external representations, UTF-8 is definitely the standard. Some 8-bit encodings are still strong (mostly in Europe) and some 16-bit encodings are still strong (mostly in East Asia), but they are clearly legacy encodings, on their slow way out. UTF-8 is standard not only on unix, but also on the web. For internal representations, there's no such ...


6

It's a convention used both to keep filenames unique, and to control the order in which scripts get executed. In general, the xx.d directories are scanned by something doing the moral equivalent of for file in /etc/grub.d/*; do ... and the numeric prefixes give this an ordering other than alphabetical. There may be application-specific standards for what's ...


5

In addition to @Sardathrion's answer, sbin directories are generally used for the binaries for various kinds of system management tools, low-level system applications, and often system daemons of various kinds. For example, among sbins you will find things like /sbin/init (which controls the boot process once the kernel has finished its internal ...


5

Would be said "arr em minus arr ef slash" as opposed to "arr em dash arr ef slash". Why is this? I think this might be regional, or age related more than anything else. Everyone said minus when I was in Uni. ... but then at that point all keyboards had a numeric pad, on the right, that had +-*/etc.


5

The recommendation in the Filesystem Hierarchy Standard is that /media contains subdirectories for mount points of removable media. There are two conflicting traditions about /mnt: some consider it a mount point, whereas others consider it a directory for mount points. The FHS requests that distributions leave /mnt alone, so that the administrator can do ...


4

I have used Unix and GNU/Linux for many years, and talked about command-line operators out loud a heck of a lot and I have never heard anyone say "minus." In fact, we don't even usually say "dash." If I'm talking to somebody and the context is clear, I'll just speak the letters of the option; using your example rm -rf / would be pronounced "arr em arr ...


4

I believe I qualify as a Unix head and I say dash because it has fewer syllables than minus or hyphen. I'd like to read rm -rf / as "rum ruff slash" but I fear almost no-one would understand me.


4

This is just a partial answer, since your question is fairly broad. C++ defines an "execution character set" (in fact, two of them, a narrow and a wide one). When your source file contains something like: char s[] = "Hello"; Then the numeric byte value of the letters in the string literal are simply looked up according to the execution encoding. (The ...


4

This is a slightly opinionated question but I'll just say this, it's highly dependent on 2 things: What is the command you're going to run? How many instances you're going to run? If you're likely to run dozens to 100's of the same process, then xargs makes the most sense. Also if the processes are going to be expensive to start up, xargs is likely the ...


3

cron derives from Chronos which is a word for time in Greek . And tab stands for table. You can know that it means a time table.


3

A lot of people actually say "tack." (I'm watching a Hak5 video right now, and the host keeps saying "tack.") The other more common pronunciations are "dash" and "hyphen." I have never heard a Unix or Linux guy say "minus" in a command-line context.


3

I am mainly a Windows guy (Don't down vote me here!) and I typically say "hyphen". I guess it is just your experience with the people you deal with and how they were brought up. Nothing specific about their computer background.


3

I've attended three Linux classes from Red Hat and two of the three instructors used the term "tack" exclusively when refering to hyphens on the command line. The other instructor said he used "dash" because he didn't want to confuse us by using "tack". From Allied Flaghoist Procedures, we learn that the word "tack" is a military term that is short for ...


3

2.6.32-29: 2.6.32: base kernel, -29 final release by ubuntu 2.6.32-29.58: 2.6.32: base kernel, -29.58 ongoing release (-29) by ubuntu 2.6.11.10: 2.6.11: base kernel, .10 tenth patch release of it. (2.6.11 was chosen by volunteers (read Greg KH) to be a "long term maintenance" release).



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