Wikipedia:Reference desk/Archives/Computing/2012 February 25
|< February 24||<< Jan | February | Mar >>||February 26 >|
|Welcome to the Wikipedia Computing Reference Desk Archives|
|The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.|
- 1 February 25
- 1.1 Shell script that prints a file tree to the screen
- 1.2 flush disc cache in Windows 7
- 1.3 Set to Terminal to run a custom command and now it closes every time
- 1.4 Norton product differences
- 1.5 Lustre is slow
- 1.6 android phone as a radio scanner
- 1.7 constitutional operating system
- 1.8 Can DokuWiki indentation?
- 1.9 buzzing power adapter
Shell script that prints a file tree to the screen
What would a shell script designed to print out a file tree like this look like?
/ directory1/ subdirectory1/ file1 directory2/ file1
- Tree (Unix) - which also give examples of how to do it with
sed. Mitch Ames (talk) 02:32, 26 February 2012 (UTC)
flush disc cache in Windows 7
Is there a way to flush the disc cache in Windows 7 without rebooting? I searched and found a program called flushmem.exe, but it did more than flush the disc cache and it locked up my system. I saw references to a program called sync, but the links to it were dead. Bubba73 You talkin' to me? 00:45, 25 February 2012 (UTC)
- When I was searching, that program came up. But I just tried it and it either doesn't work or doesn't do what I need. It says that it causes things in the disc buffer to be written out. What I need is sort of the opposite. After I read a disc file, it is still in the disc cache - I need to remove it from the cache so it has to actually read from the disc the next time. Bubba73 You talkin' to me? 16:36, 25 February 2012 (UTC)
- These guys say no and they know far more than I do. Thincat (talk) 23:17, 25 February 2012 (UTC)
Set to Terminal to run a custom command and now it closes every time
- Does it close right after running the command ? Do you type the command directly into the window ? StuRat (talk) 01:30, 25 February 2012 (UTC)
- If the problem is in gnome-terminal, and not in your shell, you can start a shell in a different terminal. You can enter console mode by pressing "Ctrl + Alt + F1", giving you a video-mode console. You could start xterm or konsole, if you have either of those installed on your system. You could start nedit or gvim, text editors which allow you to execute shell commands (by spawning bash internally, usually). The best solution is going to depend on exactly what is broken; can you elaborate? Nimur (talk) 01:37, 25 February 2012 (UTC)
- Ubuntu 11.10 uses Unity. Anything you have to say about Gnome does not apply. --Melab±1 ☎ 02:02, 25 February 2012 (UTC)
- Your Terminal application in the Unity environment is still "gnome-terminal." Even when Unity is installed, you can run the GTK and KDE shared libraries; and you can run native Linux graphical user interface applications that communicate straight to the X11 server. And, you can even switch to console mode, leaving behind X and Unity. With due respect, Melab, everything I said above does apply. Have you tried it yet? Nimur (talk) 02:58, 25 February 2012 (UTC)
- Ubuntu 11.10 uses Unity. Anything you have to say about Gnome does not apply. --Melab±1 ☎ 02:02, 25 February 2012 (UTC)
I think I know what the poster means by "a custom command". Use one of the techniques shown above to get to a command line, but don't use the Ctrl+Alt+F1 method because that won't work for our purposes. If you can't get to a command line any other way, press Alt+F2. Now enter this code:
gnome-terminal -e bash. Yes I'm aware that you're using Unity; enter the code anyway. Now your normal terminal should pop up. Go to the settings for your profile (Edit -> Profile Preferences -> Title and Command) and uncheck the box that says "Run a custom command instead of my shell". You're done. --NYKevin @285, i.e. 05:50, 25 February 2012 (UTC)
Norton product differences
What exactly is the difference between Norton 360, Norton AntiVirus, and Norton Internet Security? I looked at each article, and while it looks like 360 is AntiVirus + Backup + Firewall, I'm a little unclear if that's it, or the differences between the others. A handy comparison chart would be ideal. Any help is appreciated. Broba (talk) 02:00, 25 February 2012 (UTC)
- I'm inclined to consider it mostly marketing nonsense, but if you look at the first paragraph of Norton 360 there is a clue at least to that one's distinct attributes. ¦ Reisio (talk) 02:59, 25 February 2012 (UTC)
- AntiVirus is an antivirus program and also includes email filtering and phishing protection. Internet Security includes this and adds a firewall. 360 adds a backup to those. If you're non-commercial, all these are available from Windows for free (firewall is built in to XP SP2 and later, MSE provides antivirus and there are numerous 3rd party free antivirus solutions, and backup I think has been part of Windows for a long time). I'm not sure if there are free anti-virus solutions for commercial users. Norton has the advantage of being a well-known and fairly well-trusted name, but with a reputation for being a bit of a resource hog.-gadfium 08:02, 25 February 2012 (UTC)
Lustre is slow
I am doing work on a shared scientific computing cluster that uses Lustre (file system) to supply a 200 TB file system. I find that this system is often slow, and in particular exhibits high latency such that basic operations, such as listing a directory, sometimes pause for several seconds. Such pauses are annoying, but more significantly I routinely need to write large data sets to this system (e.g. 5 GB of data distributed in ~25 files) and such an operation will often take a few hours to complete. A comparable operation on a modern desktop will often complete after a few minutes.
I suspect it is a long-shot to get useful advice here, but I'm wondering if anyone here has experience with such systems. Is there a way for me (as a basic system user with no admin privileges) to optimize or structure my file system needs to get better performance? Dragons flight (talk) 07:47, 25 February 2012 (UTC)
- why don't you tell THEM (whoever supplies you, whoever is the actual admin) about these problems. They might not be aware of it. It could be something simple to fix, like a rogue process, a reboot, failed hard-drive(s) that haven't been replaced, whatever. Tell them about it. --18.104.22.168 (talk) 09:34, 25 February 2012 (UTC)
- As you suspect, the odds of finding someone regular enough at the RD who works with Lustre are quite low... have you considered asking on some of the forums/irc channels devoted to Lustre development? Those people will notn only be familiar but have some in depth technical knowledge too... I know that's kind of a non answer but I bet you'd get faster traction there. Also as the IP says, if you don't have root then I doubt even if we could find you the perfect solution, you're authorized to implement it.
android phone as a radio scanner
logan........... i have been working upon the major project for my IT b.tech for quite a time and i came upon this idea....i searched the internet quite hard but could not find a suitable answer...."my question is as follow:: we all know that our normal phone works by hooking up to a particular frequency upon which we make our call..and also it recieves a call because of some handshake which goes on before recieving call..in other words our phone is basically a scanner because it scans for a particular frequency...but the irony is that it is so designed just to search for a particular frequency or perhaps respond to a particular signalling information so that it can recieve a call...i chose an android phone because it is easily available in the market and is software defined as we all know it is upgradable...so can we over-ride the already existing software with another software and make it a small portable short distance radio scanner with the addition of some hardware.....and can we manipulate the phone somehow that the input be given from a computer keyboard and viewed on a monitor but the processing unit be the android phone..--22.214.171.124 (talk) 08:13, 25 February 2012 (UTC).....
- The software for the radio modem in a modern phone is generally a binary blob (often for a dedicated coprocessor, rather than the main application CPU). This kind of low-level radio tweaking isn't part of the iOS or Android APIs, so if you wanted to mess around with this stuff, you'd have to get a system image (maybe from a system update), reverse engineer that (which might be difficult, as it may be encrypted), find the firmware image in there (if there is one; the firmware will be reasonably stable, and may not be updated each time) and then reverse engineer that. And you have to worry about the communication laws of your country - most countries regulate what you can send, and some what you can receive in the mobile phone band. If you want just to mess around with software defined radio, GNU Radio is a much easier and more open environment in which to work. -- Finlay McWalterჷTalk 11:05, 25 February 2012 (UTC)
- Furthermore, mobile telephone radios are quite limited in terms of the RF spectrum. They have hardware that is specifically designed for receiving and sending data on standard telephone and mobile data networks. If you. ever played with a HAM base station, you've been quite spoiled: you can set your frequency, modulation parameters, power, and so forth; you can mix an arbitrary baseband signal on to your carrier, and (licensing issues aside), transmit and receive whatever you want, whereever you want. In a mobile telephone, the amplifier bandwidth, hardware modulation/demodulation,, and antenna matching (among numerous other technical details) are not designed for general purpose RF experimentation, so you won't be able to dial in to an arbitrary band and receive intelligible signal or data. This is to say nothing of the digital encoding and keying schemes in use today - even within the bands the telephone's radio can receive, there are a lot of details that make generic signal production or interception very impractical. Have a look at digital radio and software-defined radio. I think you may have a lot of work to get up to speed on the complexities of modern digital wireless telephone service. Regrettably, this field is neither cheap nor easy for the hobbyist/skilled technical enthusiast. Consider looking into buying a commercial telephony signal analyzer, for example the GSM software package for the PXI series VNAs. As you can see, a considerable amount of expensive hardware (several hundred thousand dollars) is required. It is, in general, prohibitively difficult to do this sort of RF work on modern systems without the assistance of a major engineering company. Perhaps you can get in touch with such a business and work out an internship or academic cooperative. Nimur (talk) 19:10, 26 February 2012 (UTC)
constitutional operating system
has anyone ever advanced the idea of a constitutional operating system? At the moment, it seems that the ultimate owner of the physical computer can do whatever they want on it. No matter what a program does, it would never have to answer to a judge program, nor is there a code of laws that a judge would judge program behavior by. Antivirus programs come close, but these are like mercenaries -- they're not part of the sovereign system. The sovereign system seems like a dictatorship.
Has anyone ever proposed a constitutional operating system, such that there were limits on what the operating system itself could do, in the interest of programs, who would be able to appeal to a judge program? Sorry, I'm not terribly versed in operating system design, but it just seem like it's still back in the dark ages and has never really had an enlightenment in this regard. --126.96.36.199 (talk) 12:01, 25 February 2012 (UTC)
- I don't understand quite what you want. But I wouldn't say that there aren't limits on what the OS can do. For example, it cannot upload all your data to a home computer somewhere without your authorization. The ideal case of a good OS is that the user is at the command. XPPaul (talk) 13:27, 25 February 2012 (UTC)
- I think you are stretching an analogy well past breaking point. 188.8.131.52 (talk) 15:44, 25 February 2012 (UTC)
- I already have enough problems arguing with "windoze" over what I want it to do, without giving it constitutional rights to argue back! Dbfirs 17:52, 25 February 2012 (UTC)
- About the "ultimate owner of the physical system can do whatever they want" ... this is what DRM attempts to defeat, and the result is either ineffective DRM or a broken system (or both). But the rest of what you say sounds unrelated. In any event, the OS is by definition whatever has ultimate control over the system resources, which include the internal "security-like" mechanisms like protected memory and rings.
- The real problem is that security mechanisms don't offer fine-grained control in the terms that people are interested in. For example, I'm not really concerned with which programs manipulate my photographs, but I might object if my browser secretly unchecked a "keep this album private" option. This kind of stuff is much harder to control in a meaningful way, but it's an area of ongoing research in security and programming languages and operating systems. I'm not an expert in this area at all, but we're probably decades away from good comprehensive solutions being actually implemented in consumer systems. Paul (Stansifer) 18:45, 25 February 2012 (UTC)
- There may be a more useful way of looking at the premise: Maybe humans' constitutions and laws are our sloppy, pathetic way of trying to approach the awesomeness of a quality operating system. Operating systems can let the user provide an absolute restriction on a particular directory such that, say, Firefox can't access anything in there at all. At all! Our laws wish they could do this. Instead, people buy locks for their doors and make governments that have to provide police and courts and punishments and constitutions in a hacked-together attempt to stop people from doing bad stuff. Comet Tuttle (talk) 21:42, 25 February 2012 (UTC)
- “it seems that the ultimate owner of the physical computer can do whatever they want on it. ” This depends on what operating system you use. As Dbfirs hints at. Microsoft software tends to only let you use you computer (that you own) in ways that only Microsoft approve of – which in practise means you have pay them for the privilege of letting 'your computer' do what you want it to do. Its a great business concept – I wish I had thought of it. Just think of buying a car and only being able to drive down roads that another company lets you. --Aspro (talk) 22:04, 25 February 2012 (UTC)
- You might like the book Code and Other Laws of Cyberspace, though its concept is different from what you're describing. The E programming language had the concept of ERights and I half-remember an associated notion of an economy between programs (I never used that language), but the article describes it mostly as capability-based security which was a pretty standard concept. WP also has a bunch of articles about the Actor model of programming, though beware, they are written mostly by the concept's inventor and they are often biased or distorted. 184.108.40.206 (talk) 02:47, 26 February 2012 (UTC)
- If I understand the OP correctly, DOS was that way. DOS got the program started then it stayed out of the way until either the program called on it for something (like input/output) or the program ended. Windows gets in the way of any program. Bubba73 You talkin' to me? 03:42, 26 February 2012 (UTC)
- I disagree with that assessment. In a modern system, the OS is only even running code at all (a) during context switches, to hand off control between threads, and (b) when a program asks it for something. The only difference is that DOS was missing part (a). The OS may impose some security restrictions (which could be disabled, but no one wants that). Now, the Windows user interface is pretty intrusive to the user, but that's a problem about the relationship between the Windows shell (which is just another program) and the user, not between Windows kernel and programs. Paul (Stansifer) 18:17, 26 February 2012 (UTC)
- A small digression: the reason we like Constitutions and democracy and whatnot in government is not because they are efficient, guarantee good results, or make everything function well. We like them because dictators usually are not benevolent. (And even if one dictator is benevolent, there is no guarantee that his or her successor will be.) If we could trust dictators to somehow, magically, be compelled to do only what would somehow balance all of the needs, resources, and values of the people to maximum efficiency, we wouldn't need something as clunky as a constitution or courts or, god forbid, a legislative branch. Now I just don't see the compelling reason to want a more democratic operating system. What's the goal, here? What's the wrong to be righted? How would such a system actually produce better output? It sounds like it would be more inefficient than the current version, and more unpredictable, with no positive gains. --Mr.98 (talk) 03:59, 26 February 2012 (UTC)
- Operating systems and all other software do not (as yet) exhibit the characteristics of Sentience – they are just math. Unless of course you're Microsoft that wants to own the un-ownable. Would you hold a funeral service for your slide rule when it slips no more and the cursor comes to is final resting place? Mind you, the do come in handy, on their eventual demise, for marking where exactly you planted those sweet peas in the garden.--Aspro (talk) 17:16, 26 February 2012 (UTC)
- Computer multitasking#Cooperative multitasking/time-sharing was in some ways giving the programs 'rights'. You can see how well it worked... In any case as others have said you seem to be anthomorphising computers too much. If you really want to use your analogy, in reality, both programs and computers are in most regards the 'slaves' of the administrators. Few people want programs that refuse to terminate when you tell them to because they have 'rights'. (And if you've used a Windows and a large variety of third party programs enough, you've probably encountered the problem when kill process doesn't actually kill the process.) People may voluntarily accept limitations in some cases if they feel they improve things, but it's not clear what benefit there is to have a third 'party' resolving 'disputes' between OS and program. It seems liable to be an unnecessarily complex addition liable to cause more problems then it prevents. People make computers and all the programs on them so they work for the people using them, not so they can stage an uprising because you're violating their rights. Nil Einne (talk) 18:04, 26 February 2012 (UTC)
- Generally speaking, we don't give abstract rights to things which are not empathic — things that don't feel. (There are some exceptions — e.g. comatose patients — but programs don't fit under any of them.) It's possible that in the far future we could have programs that qualified as that (Gibson's Neuromancer is a pretty classic sci-fi reference.) But at the moment there's nothing even close to that. So programs don't have rights. Neither does your carpet, or your shoes, or your tomatoes, or your books, or your pests. (Some insects are accorded certain rights if they are endangered. Many larger animals have some form of limited rights given to them. Many do not.) --Mr.98 (talk) 02:12, 27 February 2012 (UTC)
- The original question uses some altogether silly terminology, but the concepts are actually pretty important. There are a lot of scenarios where the owner of a computer system is not the operator. For example, consider "cloud computing" Service Level Agreement systems, where a hosting company permits an end-user to run a program with guaranteed privileges. If the hardware or low-level software fails, the system owner is obligated to roll over to new hardware (usually aided by virtualized resources), guaranteeing that the program will continue to run and meeting the contractual uptime and availability requirements. A program protected by a service-level agreement has a pre-agreed, guaranteed "right" to run, enforced by hardware and software technology; and backed up by a human business obligation with real financial consequences.
- There are other cases where a system owner (say, your corporate employer) wants to control what tools and software you may run on their hardware. Or, a server administrator wants to make sure that the un-monitored systems are behaving properly. This is the realm of trusted computing and hardware/software authentication. Only privileged programs are whitelisted and permitted to run.
- The Unix operating system, and many others like it, rigidly enforce rules about shared resources: system CPU time, file and I/O access, user access rights, and so forth, are carefully monitored. If a program is authorized to run with superuser privileges, it is guaranteed to be permitted certain operations - for example, to terminate other programs or to steal I/O hardware access away from other unprivileged programs. One might say that the entire purpose of a modern multi-user, multi-programming operating system is to lay out and enforce the rules for sharing access to a system. Nimur (talk) 18:41, 27 February 2012 (UTC)
- The OP is probably unfamiliar with the relevant terminology. You're looking for something along the lines of Access control list and Filesystem permissions. The OS can do whatever it wants (with some restrictions such as flashing hardware with unsigned firmware images) and the user is in control of the OS. The user's control is limited by their technical prowess (and certain difficulties imposed by the OS as in Windows). You can limit/control access through virtualization and certain abstractions. The .Net Framework has Code Access Permissions. Additionally, manifests can be used to restrict/grant access for Windows programs.Smallman12q (talk) 13:27, 29 February 2012 (UTC)
MediaWiki can use ":" like:
- Produced by WikiMedia
- If the purpose of the indentation is to show the relationship of comments and replies, as is most usually used here (for example, I have indented this paragraph for that reason), then the corresponding function in DokuWiki uses the greater than character (>) rather than the colon. However, this is not represented onscreen in the same way as MediaWiki's indentation (I actually think Doku handles it better). If you are looking to produce the same onscreen results, then according to the page I linked it doesn't seem possible using only their own markup. AJSham 19:10, 25 February 2012 (UTC)
buzzing power adapter
I have an older Netgear router with a largish (as such things go) power cube, that recently has started making an annoying buzzing noise (fairly low frequency). It stops when I press down on a certain spot on the outside of the cube, suggesting some adhesive or something has loosened up just underneath that spot, allowing a component to vibrate. Any idea if 1) it's possible to fix a thing like that, 2) whether continuing to use it is a likely significant safety hazard (e.g. it might catch on fire) rather than just an annoyance? Thanks. 220.127.116.11 (talk) 23:09, 25 February 2012 (UTC)
- You could go to a local hardware store and buy an appropriately sized clamp to hold the power cube where it vibrates, thus keeping it from vibrating. That doesn't fix it but it would keep it from buzzing. Dismas|(talk) 02:37, 26 February 2012 (UTC)
- Thanks, I might try that, though having a clamp around the cube while it's plugged in will be a bit awkward. I was thinking more in terms of opening it up and re-glueing whatever is loose. Well I was thinking of replacing the router anyway, in favor of a fancier one, so maybe this cube issue will help things along. 18.104.22.168 (talk) 06:16, 26 February 2012 (UTC)
- The buzzing probably won't generate enough heat for it to catch fire. Also, can't you tell if it's getting hot by touching it ? This could be an indication that it's likely to fail soon, though. The vibration can't be good for it, but, in any case, once one part of it fails (the adhesive), that probably means it has reached the lifespan for which all the components were rated. So, having a spare ready to go might be a wise choice. StuRat (talk) 07:06, 26 February 2012 (UTC)
- Thanks, yeah, you're probably right, and I wonder where to even get a spare P/S. I guess I could call Netgear tech support. I never really noticed the size of the brick before--the router is a relative power hog by today's standards. The P/S isn't warm but the router itself does get pretty warm. I've opened another thread about picking a replacement router. 22.214.171.124 (talk) 10:05, 26 February 2012 (UTC)