Wikipedia:Reference desk/Archives/Computing/2010 March 11

= March 11 =

"&" in command line
Does  mean anything when used at the command line in Windows? Apparently in Unix it makes a command run in the background, is this the case on Windows as well? r ʨ anaɢ talk/contribs 06:06, 11 March 2010 (UTC)
 * It is usually used to put two commands onto one line. The following example moves to the root of a drive and lists its contents:


 * It is also used to duplicate a handle (e.g., standard error [A.K.A. STDERR or 2] or standard output [A.K.A. STDOUT or 1]). Say you wanted to list the contents of a folder and output any errors to a text file. You could type this to do that:


 * The above example redirects the output of the dir command to a text file named list.txt. It also puts any error messages in that same file by redirecting STDERR to a copy of STDOUT.--Drknkn (talk) 06:20, 11 March 2010 (UTC)


 * This doesn't exactly answer the question, but might be useful: Microsoft's command line reference list It doesn't include operators though.


 * In bash a single & will background the command, but a && is an "and" operator so it works to execute commands in succession, but maybe the more straightforward way to do it in bash is to use " ; ", which is the command separator. I'm not sure if there's ever a practical difference though (except the &&s will actually evaluate). Shadowjams (talk) 07:01, 11 March 2010 (UTC)


 * Bash's && short-circuits like in C-derived languages: if the first command fails then the second command isn't tried. With ;, both commands are run regardless of their exit statuses. &mdash;Korath (Talk) 07:30, 11 March 2010 (UTC)
 * Thanks. The one I was thinking of was the one I've seen used at the end of a command, as in
 * (for previewing DVI files on Unix); judging by Shadojams' comment, it sounds like the command-final & has the same function in Windows. r ʨ anaɢ talk/contribs 16:30, 11 March 2010 (UTC)
 * (for previewing DVI files on Unix); judging by Shadojams' comment, it sounds like the command-final & has the same function in Windows. r ʨ anaɢ talk/contribs 16:30, 11 March 2010 (UTC)


 * In DOS (and the command prompt for Windows), the '&' serves the same purpose as the ';' in Linux, it's an unconditional sequential execution operator. DOS isn't multiprocess aware, so it can't run background processes. All the & says is: "When the program to the left of me finishes (whether or not it succeeds), run the program to the right of me." &mdash;ShadowRanger (talk 16:41, 11 March 2010 (UTC)
 * Ok, that makes sense. Thanks for the help! r ʨ anaɢ talk/contribs 17:00, 11 March 2010 (UTC)


 * I posted a detailed explanation of what the ampersand does in Windows. Posting detailed explanations is not something I will do again for you.--Drknkn (talk) 17:04, 11 March 2010 (UTC)


 * Was that necessary? Nothing he posted asked you for an additional "detailed explanation". Thanks,  gENIUS 101  21:39, 11 March 2010 (UTC)


 * You're right. I shouldn't have said that. He did nothing wrong. I apologize.--Drknkn (talk) 23:21, 11 March 2010 (UTC)

RAID stripe data recovery
I purchased a Apple Intel Tower which subsequently had a hard disk fail. The hard disks (2) in OSX (10.6) were set to a Raid stripe(?) config - now that the main Hard disk is dead... is there any way to recover any data from the 2nd striped HD ?--Boomshanka (talk) 10:16, 11 March 2010 (UTC)
 * Nope. If any hard drive in a striped array fails, all the data is gone. 121.72.196.8 (talk) 11:07, 11 March 2010 (UTC)


 * Striping RAID 0 is often referred to as "not a RAID" because there is no redundancy in the data. That is why losing a drive loses the whole thing.  RAID 0 is not used for handling drive failure.  It is used for drive speed - dividing large read/tasks among multiple drives at the same time. --  k a i n a w &trade; 13:33, 11 March 2010 (UTC)
 * Well, the term "stripe" is used in raid levels higher than 0, so it's possible you had redundancy. If not, data recovery from the failed drive might be possible, but it's an unreliable and expensive process.  There are some cheap hacks that you can try though, like putting the drive in the freezer for a while, then trying to start it while it's cold.  This is said to sometimes temporarily fix electronic problems for long enough for you to read the data from the drive. 66.127.52.47 (talk) 12:19, 15 March 2010 (UTC)

Windows Vista
I would like to disable users from using USB ports. How do I go —Preceding unsigned comment added by Tajadi (talk • contribs) 10:32, 11 March 2010 (UTC)


 * That depends on the purpose. If all you want to do is keep someone from plugging a random USB device into your personally-owned computer and getting it to connect, some scripting/ADM templates and creating a user account with limited privileges for everyday work is a simple approach. If the computer in question is part of a company network where several users need to log on, and some might even have elevated or full administrative privileges, things get a little bit more hairy, and you might want to look into one of the commercially available solutions. -- 78.43.60.58 (talk) 11:43, 11 March 2010 (UTC)


 * Or you could physically disable the ports, by filling them in epoxy, clipping the leads on the motherboard, etc, assuming you don't need any USB access at all (say, for keyboard and mouse). Again, purpose-dependent. &mdash;Korath (Talk) 12:21, 11 March 2010 (UTC)
 * That's a bit drastic. Most likely OP just wants to block mass storage devices from being used. You can do this from the control panel when logged in as administrator —Preceding unsigned comment added by Fire2010 (talk • contribs) 13:48, 11 March 2010 (UTC)


 * You can lock it down/configure what is allowed using Group Policy. The Microsoft page here has more information on this. Another option is to use 3rd party software such as DeviceLock which allows a lot more control over what is/isn't allowed and also locks down Windows XP machines (which Group Policy can't do). ZX81  talk  18:23, 11 March 2010 (UTC)

Limiting Ubuntu Hardy Heron's use of CPUs / Cores
Is there any way of telling Ubuntu that unless specifically requested otherwise, it should only use the first core (core 0) in a multi-core machine? The reason I'm asking is that I want to run virtualization software on it, and the two virtual machines have different CPU needs, so my plan would be to run the CPU-intensive VM on the second core (core 1), while running the host system and the less CPU-intensive VM on the first core (core 0). The virtualization software allows for such a setting per VM, I just haven't found a way to make the host stick to one of the two cores. Is that possible, and if so, how? -- 78.43.60.58 (talk) 11:18, 11 March 2010 (UTC)


 * Kinda. You can use the taskset program to set the processor affinity of a given process. So you could, with a bit of labour, set all the CPU-intensive processes in the host to CPU-A and set the virtualisation program (VmWare or whatever) to CPU-B. You can't completely banish the host from CPU-B, but this procedure should be enough to give the VM essentially all the cycles on it. -- Finlay McWalter • Talk 11:48, 11 March 2010 (UTC)


 * But I don't think this will, in most circumstances, turn out to be a terribly good idea. The scheduler is pretty smart, is cache aware, and knows a great deal more about the real-time characteristics of your running system than you can. This IBM article lists the very few reasons where setting processor affinity might be a worthwhile idea. -- Finlay McWalter • Talk 11:56, 11 March 2010 (UTC)


 * Unfortunately reason #1 from that article is "I have a hunch", which I believe is what 78 has. 74.212.140.226 (talk) 17:33, 12 March 2010 (UTC)


 * What? It's not that complicated. You can pass the number of cores to use as a kernel parameter at boot time. Just edit your grub menu.lst and add maxcpus=1 to the end of your "kernel" line. (Alternately, if you use maxcpus=0 or nosmp, SMP will be disabled. I'm not entirely sure what the difference is, for your purposes.) If you want to boot into full SMP mode, just reboot without that kernel option (ie, keep at least 2 menu entries in grub). If you want to do it without rebooting, well... that's complicated. Indeterminate (talk) 10:49, 13 March 2010 (UTC)
 * The way I understand the article you linked, that would completely disable the CPUs with higher numbers than the number specified on the maxcpus=n line. Which would mean they are out of reach of the VMs as well - obviously not what I want. :-/ -- 78.43.60.58 (talk) 15:39, 13 March 2010 (UTC)
 * Ah, right, this is for a host OS, my mistake. In that case, perhaps isolating the second core from the scheduler is a better option. The description claims that this works better than manually setting the affinity of all the processes. The boot option for that is isolcpus=1 (since it starts at 0). Then when you create your VM, you can move it onto the second core using taskset. The isolcpus option has apparently been superseded by dynamic scheduling domains, but that's getting way out of my comfort zone. It'll probably remain in the kernel for the foreseeable future. Indeterminate (talk) 21:26, 13 March 2010 (UTC)
 * That works, with one caveat (which you mentioned) - this requires manually setting the processor affinity of the VM that has the CPU-intensive workload using taskset, as VMware Server seems to be bound by the isolcpu setting as well. While you can add processorn.use = "FALSE" to a VMware config file, it will still use processor #n if that is the only one available because of the isolcpu setting. Again, not saying that you were wrong here, just pointing out a caveat in case some day someone else searches the archive for a solution to the same problem I had. It's tempting to think "Okay, I set isolcpus for the host OS, I defined the per-VM processor use in the config files, now my VMs should run on the CPUs I specified, riiiiight?" -- 78.43.60.58 (talk) 10:22, 16 March 2010 (UTC)

Upload speed
What is the minimum upload speed a server should have so that loading pages won't take too long on the other end, and a small number of users won't consume all the bandwidth and make the site unreachable? —Preceding unsigned comment added by Fire2010 (talk • contribs) 13:58, 11 March 2010 (UTC)


 * That depends on how many users is "small" and how much data each one is expected to consume. For a half a dozen users looking at purely static HTML pages of a KB or two in size, consumer grade DSL (768 Kbps upload) would be more than sufficient, but for fifty users on an AJAX enabled site with constant communication, or a Flash video server, it won't be nearly enough. Basically, you need to work out the peak expected upload rate (total size of X number of users download Y KB of data at the same time, divided by the number of seconds you consider reasonable for responsiveness). &mdash;ShadowRanger (talk 16:36, 11 March 2010 (UTC)

Were can I find Debian 5.0.0 CD/ISO?
Can anyone point me to an ISO of Debian 5.0.0? I spent many time searching and I find nothing. I really need version 5.0.0 and not later versions like 5.0.4. I know I can mess around with repositories and change them to older ones (or later one) and do all sort of fun things, but what I need is really the installable ISO. Thanks --SF007 (talk) 16:17, 11 March 2010 (UTC)
 * Just found it here! http://cdimage.debian.org/cdimage/archive/   --SF007 (talk) 16:32, 11 March 2010 (UTC)

Secret Web Page
Is it possible for me to upload information to the internet and not have it show up in a search engine? Or, are the search engines so thorough that they will find and catalog anything I post? Hemoroid Agastordoff (talk) 20:44, 11 March 2010 (UTC)


 * Well, with a proper robots.txt, well-configured search engines can be told not to index a site (or specific pages within the site). &mdash;ShadowRanger (talk 20:50, 11 March 2010 (UTC)


 * If you don't link to the page, it will never be found (short of an intrusion or guess); but if you don't link to the page, some might consider the entire endeavor pointless. ¦ Reisio (talk) 20:54, 11 March 2010 (UTC)


 * Yes, if you have the page at a complex random URL never mentioned anywhere, not linked to from anywhere, and not linking anywhere (or at least not being used to go anywhere - otherwise the referrer field can give you away), search engines are extremely unlikely to find that page. --Stephan Schulz (talk) 20:58, 11 March 2010 (UTC)


 * (ec)In addition to robots.txt (which legitimate search engines respect, but which the spiders than scammers and spammers use ignore) you can exploit how search engines find your pages. Search engines collect web pages using a web crawler, which traverses the network of links inside sites. If there is no link to a page, a web crawler can't find it and won't read it. So long as you (and, crucially, anyone you tell about the page) doesn't post a public link anywhere, a crawler won't find it. In theory someone could guess the page's url and speculatively try that (bar a few common and legitimate examples, no sensible spider will resort to guessing), but you can avoid that by giving pages an essentially unguessable name (e.g. http://agastordoff.net/320894503984309482304983.html); and you need to make sure that your web host's auto-index feature is disabled (or provide a blank index for that folder). Strictly, if the content is secret or illicit, this amounts to security by obscurity, which is really no security at all - so anything that you want to protect more than just casually you should at least hide behind a password, or better yet a proper login (and transmit over ssl). -- Finlay McWalter • Talk 21:04, 11 March 2010 (UTC)


 * Alternatively, you could always encrypt the content itself, rather than require an SSL login. Anyone can get your data, but without the decryption key it's worthless. &mdash;ShadowRanger (talk 21:05, 11 March 2010 (UTC)


 * This may surprise a lot of people, but most of the information on the Internet is actually not available through search engines. It's called the "Deep Web" or "Invisible Web". A search engine can't index something it can't find, so as is said above, if a page is never registered with a search engine or linked from anywhere else, it won't show up on a search engine. A website without any links that is never registered in a search engine is kind of like a pond that isn't connected to a river or any other water source--no matter how hard you try, you can't swim from any other body of water into the pond, because there's no connection. For all intents and purposes, that pond doesn't even exist to you. That's kind of a bad analogy, I know, but hopefully it makes sense.


 * Some other reasons why a site/information wouldn't show up in a search engine is if it's part of a password protected site (so the search engine "spiders" can't scan the site), a dynamically generated site, or if it isn't in a textual/HTML format (for example, the contents of a picture or video can't be indexed by a search engine). 24.247.163.175 (talk) 22:11, 11 March 2010 (UTC)


 * Many ways:
 * Set up a robots.txt file that tells search engines to exclude the content (relies on search engines to obey it... many/most do, though)
 * Put the content behind a password
 * Set up some kind of simple CAPTCHA
 * Don't link to it from anywhere else (relies on nobody else linking to the page)
 * Which of these makes the most sense depends on who you want to view the page more than it does who you want to keep out. --Mr.98 (talk) 22:31, 11 March 2010 (UTC)


 * Google also uses Sitemaps to find and index sites. If you have put one on your site, make sure that your "hidden" page doesn't appear in the sitemap list. --Phil Holmes (talk) 09:23, 12 March 2010 (UTC)


 * Another way is to use  in the header of the HTML file. With "noindex,follow" you probably cause search engines to follow links from your page but don't index the page itself - I think that's the classical way "google bombs" are created. Icek (talk) 18:24, 12 March 2010 (UTC)
 * Addendum: I meant to say that google bombs are probably created by having many pages with "noindex,follow" which link to the page you want to "bomb", with the bomb keyword as the link text. The pages then can link to each other too, without appearing on Google's results page. The linking of bomber's pages to each other may increase the PageRank. Icek (talk) 18:43, 12 March 2010 (UTC)


 * The safest way to go would be to password protect it, or put it behind some type of authentication firewall.Smallman12q (talk) 22:41, 12 March 2010 (UTC)