Tag Info

Hot answers tagged

94

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 ...


30

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


24

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 ...


20

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, ...


18

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 ...


11

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 ...


10

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.


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 ...


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

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 ...


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

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 ...


5

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 ...


4

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.)


4

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 ...


4

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

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

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 ...


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

Yes, but Linux separates different sizes of icons into different directories instead of giving them different names. You'll want to read the Icon Theme Specification, which explains the directory layout, and the Icon Naming Specification, which explains how the filenames should be chosen. To summarize, Linux application icons would be something like: ...


3

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 ...


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).


2

The Filesystem Hierarchy Standard specifies where Linux distributions should place files. bin directories contain executables intended to be used by any user, while sbin directories contain executables intended to be used only by the system administrator. sbin directories are normally only in root's $PATH. /bin (and /sbin) contain programs that are needed ...


1

As you said it, the Unix file extensions are purely information. You just need your script to have a correct shebang and being executable. You can either have no extension or using .sh. I personnaly use the following conventions, regardless of the shell used (csh, tcsh, bash, sh, ...): no extension for system or high grade scripts (extremely rare). the ...


1

I got the answer from the following links. (The site is in Chinese, but the abbreviations and their meaning are in English.) http://i.linuxtoy.org/docs/guide/ch02s02.html http://i.linuxtoy.org/docs/guide/ch02s03.html


1

one claiming that the common convention for internal strings in international applications in Linux is UTF-32 This is probably a reference to the fact that GCC defines wchar_t as a UTF-32 character, unlike Windows C(++) compilers that define wchar_t = UTF-16 (for compatibility with Windows WCHAR). You could use wchar_t internally if that's convenient ...


1

There are a couple confliting parts here. The comment about being able to do whatever you want is true, but it will also make much more work for you in the long run. If you have any idea about re-arranging anything outside of your home directory, stop! That's way more complicated than you think and you should leave it alone. If you don't like it you should ...


1

On Windows, many command line options are / (eg. dir /?) so saying dash might too easily be confused with slash.... which is exactly like a lot of commands on Windows when you've installed some useful unix-y command line tools - I keep forgetting which ones use / and which use - !


1

I've been working in unix since about 1987 (BSD, SunOS, Solaris, IRIX, Unicos, Linux) in several places around the country (USA) and have almost always heard the "-" character called a dash. I myself usually say dash. One exception is when saying "kill -9": I've only heard that as "kill minus 9". I don't know why it has been like this but that has been my ...



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