Wikipedia:Reference desk/Archives/Computing/2008 August 29
Computing desk | ||
---|---|---|
< August 28 | << Jul | August | Sep >> | August 30 > |
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. |
August 29
[edit]../.. in a real OS
[edit]I'm surprised that bash hasn't incorporated the convenient 4DOS innovation (also in Take Command) of interpreting "...", "...." etc as "../..", "../../.." etc. Is there some way of making it do so? Or does this come with zsh? (I haven't yet tried zsh, but I don't notice this little feature mentioned here.) -- Hoary (talk) 02:22, 29 August 2008 (UTC)
- You can alias each one if you like. In your .bashrc file add lines like: alias ...='cd ../..' -- kainaw™ 02:30, 29 August 2008 (UTC)
- (Sound of hand slapping forehead.) I can even alias that? Goody goody. Thank you! -- Hoary (talk) 04:52, 29 August 2008 (UTC)
- But you can't do stuff like
cp file ...
orcd ...
so it's not seamless. --Kjoonlee 05:48, 29 August 2008 (UTC)
- But you can't do stuff like
- (Sound of hand slapping forehead.) I can even alias that? Goody goody. Thank you! -- Hoary (talk) 04:52, 29 August 2008 (UTC)
- In theory, though, you could have files named "..." or "....", though I don't know why anyone would. --Spoon! (talk) 19:19, 29 August 2008 (UTC)
- For the same reason that someone would have a file named "-rf"? --Carnildo (talk) 22:14, 29 August 2008 (UTC)
- In Linux/Unix at least, for any particular directory, you could make a symbolic link:
ln -s ../.. ...
ln -s ../../.. ....
- Then ... and .... work just like .. does. I guess you could write a script to stick that link into every single directory on your system - but that's a bit extreme! If you carefully examine how Linux/Unix implements '..', you find that it does it by creating a link from .. to the parent directory - so this hack works in exactly the same way (well, except that I used a symbolic link instead of a hard link). You can (with care) delete the '..' link and everything happens exactly as you'd expect!
- This would work in every program - not just the shell. For some reason, this worries me - but I can't think why!
- SteveBaker (talk) 20:41, 29 August 2008 (UTC)
- I'm sure you probably already know that
~
is your home directory, so~/Desktop
becomes/home/your_username/Desktop
. May save on typing dots. --h2g2bob (talk) 22:51, 29 August 2008 (UTC)
- I'm sure you probably already know that
- Yup, I know that much. (Although since I've been asking some pretty stupid questions recently, it's not at all unreasonable of you to wonder if I know it.) So, "..." is an acceptable filename. Yes, come to think of it, I can't see any clear reason why it shouldn't be. Well, that would rather screw up chances of having "'...' = '../..'" (etc) built into zsh. Thank you all for your comments! -- Hoary (talk) 02:58, 30 August 2008 (UTC)
- Certainly "..." is a legal Linux/Unix filename - but so is "*" (for example) and that doesn't stop the shell intercepting the '*' character and doing stuff with it. I think any character except forward-slash and '\0' (ASCII character code zero) are legal in filenames - but lots of characters are intercepted by the shell and "mangled". If you think about it, even if files were not allowed to be named "...", it would still be confusing if you typed:
echo Hello ... Hoary
- ...because with the zsh hack, that would print:
Hello ../.. Hoary
- But we learn to use the backslash escape character to tell the shell NOT to interpret those characters - so you can create that file called "*" by saying:
touch \*
- So we can't say that filename rules are the reason we don't have "..." and "...." built into the various Linux shells.
- SteveBaker (talk) 03:41, 30 August 2008 (UTC)
- That does indeed figure. Ah the wonderful backslash (my little friend in sed). -- Hoary (talk) 01:08, 2 September 2008 (UTC)
Brown wire on CAT6 cable
[edit]What does the brown wire in a CAT6 cable do? Right now, the CAT6 cable I use has been completely severed. I think the others are all OK. I'd like to know if this is something I need to worry about. The article 8P8C (which I found via TIA/EIA-568-B, via the CAT6 article) says: "The remaining (brown) pair is increasingly used for Power over Ethernet (PoE)". To me, this seems to imply that the brown pair is traditionally just for "whatever", but the standard is becoming PoE. Is there anything I won't be able to do online with the brown wire cut? Thanks. — Twas Now ( talk • contribs • e-mail ) 04:12, 29 August 2008 (UTC)
- The brown wire is used if you are using gigabit ethernet or 100baseT4. But your normal fast ethernet or 10baseT does not use it. Your cable is longer cat6 standard if the wire is cut. Graeme Bartlett (talk) 06:01, 29 August 2008 (UTC)
- Thank you. When I said "the CAT6 cable … has been completely severed" I meant "the brown wire in the CAT6 cable … has been completely severed". The Internet works, so I guess everything is fine. — Twas Now ( talk • contribs • e-mail ) 21:27, 31 August 2008 (UTC)
Can I send myself a message at regular intervals?
[edit]There are a few things I need to check every month or so, which I am likely to forget. A (paper) diary is not an option. The only solution I can think of is sending myself a delayed email at a specified time. But operamail, which I use, doesn't seem to provide such a service. Neither does gmail, as far as I can see. Also note that I may very well be abroad for months on end, so it can't be something that runs on my home computer either. DirkvdM (talk) 08:45, 29 August 2008 (UTC)
- Well, couldn't you just have Google Calendar (or a comparable service) send you an e-mail reminder once a month? I'm sure you can program a recurring event like that. I don't know if it supports an e-mail address other than gmail, but if it doesn't, you could just have gmail forward things to your preferred address. I think that would do the trick. -- Captain Disdain (talk) 10:19, 29 August 2008 (UTC)
- Thanks. I tried that and at first thought it worked, because I had set the time to just 15 minutes ahead and indeed I received an email. But it was not sent at the time I thought I had specified, but apparently just straight away. And indeed what I filled in is a timespan, not a moment, so I don't understand what triggers the sending of the mail. Alas, the 'help' link doesn't help one bit. So I tried another, this time with a 'start time' at 06.00 and set at daily (the shortest option offered). So if I now receive this mail tomorrow (and the day after etc) it should work. Indeed, I didn't receive one yet (which is why I set a time that is already past), so that's a good sign. I still don't understand what it is, though. Manuals have always been the weakest point of most products, and that seems to go for Google products as well. DirkvdM (talk) 12:00, 29 August 2008 (UTC)
- Google Calendar emails are sent X minutes/hours/days before the start of the event, where X is configurable when creating the event. I don't think an email reminder is the default, though, so it should be checked when creating the event. You can specify multiple reminders - e.g. one day before the start, one hour before and 15 minutes before. The emails only go to your gmail account. --LarryMac | Talk 13:04, 29 August 2008 (UTC)
- (edit conflict)Well, the point of a reminder is to come in before the event in question, so that probably explains why you got it fifteen minutes before the event -- after all, if it sent the reminder when the event is supposed to take place, it'd be too late, right? Anyway, what you want to do is set an event for a certain day -- say, 5pm on the 1st day of the month, and set it to repeat monthly, and have it e-mail you a reminder, say, five hours in advance. In Google Calendar, you can apparently set multiple reminders for different times, so you could have it first remind you the previous day (the last day of the previous month), and then again the next day at noon, for example. Just make sure you don't set an expiration date for the event, and you should be good to go. I can't see any reason why this wouldn't work. -- Captain Disdain (talk) 13:18, 29 August 2008 (UTC)
- I received the daily test-reminder in good order this morning. And I now see the time option under 'reminder', without any explanation, so one has to guess the meaning. Just like the 'where' field - I suppose that means where to meet, but it doesn't say. The confusing thing was that I thought that the reminder was the event. Rather like an event in programming, which is a trigger, which is precisely what I want - a trigger for me to do something every month. I also assumed it was a personal calendar. So the email coming in before the event didn't make any sense to me. Now it does, though. The default 10 minutes is rather short notice, though, for most events. Anyway, it works. Thanks.
- I see there is a 'resolved' tag now, so I added that. DirkvdM (talk) 05:55, 30 August 2008 (UTC)
zip
[edit]I have a 67mb file that I want to email to a friend, I used winzip to make a new archive, it is now 60mb, how can I zip it to make it small enough to email? Thanks —Preceding unsigned comment added by 193.115.175.247 (talk) 08:51, 29 August 2008 (UTC)
- What is the document? It isn't likely that a 67mb doc will be able to be compressed to 'email size' (presumably you're thinking around 1-5mb?). I think your best bet is to set up the file as a torrent and then send the link to the individual, they can then download it from your machine. This was, to a degree, the reasoning behind the development of things like bit-torrent, to rapidly share documents/files (though one person to one person isn't quite the same). Alternatively burn it to Cd and send it, or get a usb-stick - or use a program like Skype or AOL Messenger - both these allow you to send files to each other. I guess someone with a greater knowledge of compression will be around soon enough incase it is possible to drop from 60+mb to under 10 - I think it will depend largely on the type of information though. 194.221.133.226 (talk) 10:15, 29 August 2008 (UTC)
- As 194.221.133.226 says, you most likely can't compress the file that much, unless it contains data that is particularly compression-friendly. You can't just make it as small as you like -- if you could, that would pretty much revolutionize the computer industry. Comparison_of_file_archivers#Comparison_of_efficiency will give you some idea of how efficiently you can compress data. (I'm assuming that you're sending something that you want to arrive intact, and are thus using lossless compression. Lossy compression can have drastically different results, but it'll wreak havoc on many files, rendering them more or less useless. Then again, if your file is a bunch of pictures, you can adjust the JPG compression ratio and dramatically reduce their size (as well as their quality, after a certain point). -- Captain Disdain (talk) 10:50, 29 August 2008 (UTC)
- I assume you have tried the high-compression option of winzip? 7-zip (free) I find has better compression than a standard .zip file and also has a high-compression method, so you might be able to squeeze it smaller than you can with winzip. It also has the option to break-up a file into multiple compressed files, so you could send many emails with parts of the compressed file that your friend would extract once he has them all. Phydaux (talk) 11:00, 29 August 2008 (UTC)
- There are many sites set up around the net for just these sorts of large file transfers. RapidShare is the most famous, and it works fine. Upload it there, send your friend the link, and he can download it. 90.235.4.27 (talk) 14:18, 29 August 2008 (UTC)
http://mediafire.com/ (not spam) -59.95.103.249 (talk) 18:28, 29 August 2008 (UTC)
- I personally also use MediaFire.com, very good site. SF007 (talk) 12:35, 30 August 2008 (UTC)
- If you're really desperate, try PAQ. --wj32 t/c 10:37, 31 August 2008 (UTC)
what are the most recommended free Remote desktop software
[edit]any suggestions? Acidburn24m (talk) 14:52, 29 August 2008 (UTC)
- I like TightVNC http://www.tightvnc.com/. Depending on how you are connected to the target computer TightVNC can be very effective, because it requires less data to be transfered than a lot of the other remote desktop solutions. Plus it works accross platforms (You can log into a PC, a Mac, or a Linux box, and the software runs on all of them too). Anythingapplied (talk) 15:39, 29 August 2008 (UTC)
- I use rdesktop. -- kainaw™ 16:47, 29 August 2008 (UTC)
- This question is way too vague. It's like saying "I want a way to get to work. Any suggestions?" Well, it all depends on where you are going, and where you are coming from, and what mode of transportation you like (boat, train, car, bike, bus, etc.; but not all may be available depending on where you are). Similarly, the answer to this question depends on what OS you are remotely connecting to, what OS you are connecting from, and what protocol you would like to use. There are many protocols (RDC, VNC, NX, etc.), each with advantages and disadvantages. Do you get to choose what software to use on both the client and server? Or do you have a requirement to use a particular protocol because of existing software on the server? For each protocol, there are dozens of clients and servers, many of which only work on one OS or another, so it is impossible for us to say anything unless you tell us what OS's you are talking about. For example, the previous poster mentioned rdesktop, which is a Unix-only client for the RDC protocol (only), which is almost exclusively used with Windows server software. So that may or may not be applicable depending on what your situation is. For connecting to Linux, there is a protocol called NX, which is known for being very fast, secure, and opens up new sessions by default which is convenient. There of course there's the VNC protocol, which is very widely used but takes some work to make it secure. There are dozens of VNC clients. I'll just give a table of the common free/semi-free choices.
Protocol | Servers | Clients |
---|---|---|
VNC | RealVNC Free (free software; Windows & Unix) Vine Server (free software; Mac) |
RealVNC Free (free software; Windows & Unix) Chicken of the VNC (free software; Mac) |
RDP (mostly for connecting to Windows) | MS Terminal Services (Comes with certain versions of Windows; not free) xrdp (Unix; nobody uses; free software) |
MS Remote Desktop Connection (freeware; Windows & Mac) rdesktop (free software; Unix) |
NX (mostly for connecting to Linux) | Official server (freeware; Unix) FreeNX (free software; Unix) |
Official client (freeware; Windows, Unix, Mac) Various free-software clients under development |
--Spoon! (talk) 21:00, 29 August 2008 (UTC)
TI-84 Plus series Calculator question
[edit]I have one of these for school, and I was wondering why, if I switch the 4 batteries around inside the calculator when it is running out of power, the tool will last so much longer. When the calculator gives me the LOW BATTERY screen, I switch the batteries maybe a month later and the machine works for another 6 months. Then I switch them again. I did this from freshman all the way through sophomore year in high school, switching them maybe 3-4 times. I use the calculator daily for 9 months. Thanks The Reader who Writes (talk) 15:12, 29 August 2008 (UTC)
- If the batteries aren't simply connected in series (or if you're mixing different battery chemistries), the calculator will drain the batteries unevenly. Rearranging the batteries will put the weaker batteries somewhere where they aren't having as much effect. --Carnildo (talk) 22:17, 29 August 2008 (UTC)
Mediawiki-style personal wiki
[edit]I've been looking for a personal wiki (one that I can use offline, on my own computer) that resembles Wikipedia in terms of some features (like the ability to create redirect pages) and use (like making links by typing brackets). I have checked out and tried several, including ConnectedText, which is the one I've used most, but they don't seem to have the same ease of use. I even tried downloading the Mediawiki software, but my computer skills aren't great and I got to a certain point and got stuck and had to uninstall everything.
Can anyone tell me whether it's possible to use the Mediawiki software in this way (or would I have to have a website to use it on), or whether there are personal wikis that are similar? Thanks, Exploding Boy (talk) 15:46, 29 August 2008 (UTC)
- You can certainly use Mediawiki yourself, offline. Install a server that supports MySQL and PHP, and then download Mediawiki (there's an installation guide at Mediawikis own site). The easiest way to do it on windows is probably using EasyPHP. I does take some know-how, but it's still pretty easy. And just because it's a server doesn't mean that its necessarily public, if you're behind a router you don't have to worry about that :)
- If you are looking for a good standalone wiki that doesn't require a server, I'm a huge fan of TiddlyWiki which is an entire wiki stored in a single HTML file (that you can take with you if you want, on a usb stick or something). It requires nothing more than a browser and is great as a note-taking, personal database-thing. 195.58.125.51 (talk) 16:23, 29 August 2008 (UTC)
- I got as far as downloading EasyPHP and Mediawiki and now I'm thoroughly lost. The installation instructions are a complete mystery to me... Sigh. Exploding Boy (talk) 17:05, 29 August 2008 (UTC)
- Microsoft Sharepoint WSS3.0 comes with some wiki stuff (it comes with windows server), but it is pretty terrible. NByz (talk) 17:57, 29 August 2008 (UTC)
- IMHO, you'd really be better off dumping the Microsoft server stuff and switching to Apache. Apache and PHP work together cleanly and easily out of the box. Then you need MySQL - which (for me) was the hardest thing to get working - but even so, I got it all together in a few hours. Then installing MediaWiki is about as easy as copying the files onto your server. The whole thing went pretty smoothly for me. MediaWiki is really a LOT better than most of the alternatives - and most people are more familiar with MediaWiki (because of Wikipedia) than they are of the other varients.
- I have two MediaWiki's that I run - one for my own random stuff and another for the car club I run. Once installed - they work pretty much exactly like mini-Wikipedia's - except you are the admin/sysop/Jimbo. So you set the rules - you enforce the rules. Probably the first thing you'll want to do is to disable anonymous editing and perhaps anonymous account creation. IP users are a major source of grief on Wikipedia - but at least there are tens of thousands of people patrolling and reverting vandalism. When it's just you - or even you and a few friends - the amount of vandalism from porn-merchants and their bots will soon overwhelm your ability to keep things looking nice - so you might as well require account creation from day one. I also protect the 'main' page (just as Wikipedia does) so that only I, personally, can edit it. For my personal Wiki, I disallow anonymous account creation - which means that only existing users can create new accounts. That has the effect of requiring a "by-invitation-only" membership. Any existing user can create an account and give it to someone else - but someone at random on the Internet can't create an account and therefore can't edit or upload. If someone starts causing trouble - I can ban them - and also complain to the person who let them in - and (if I feel like it) remove their ability to create new accounts. You could go one step further and only allow admins (ie you) to create accounts - so nobody gets write access without you saying so. You may want to give your Wiki a distinctive style by editing the default style in some way - and by changing buttons and logos to something more distinctive. You might also want to change the default licensing rules for the content you allow people to add. There are a bunch of plugins you can either add or not add for stuff like math and diagrams. SteveBaker (talk) 20:20, 29 August 2008 (UTC)
- That all sounds great, and exactly what I need, but I don't seem to be able to actually set the damn thing up. My second attempt went even more badly than my first... Exploding Boy (talk) 20:29, 29 August 2008 (UTC)
- Take it one step at a time. Can you get Apache running? That's a first (and in my experience, not an easy thing to do). --98.217.8.46 (talk) 02:45, 30 August 2008 (UTC)
- IMHO installing AMP is a lot easier in Linux than Windows. For example I just need to do
sudo apt-get install apache2
(or from Synaptics) and I'll get a working HTTP server on localhost. Of course, there are also packages such as XAMPP that makes installing the whole thing easier. --antilivedT | C | G 05:46, 30 August 2008 (UTC)
- IMHO installing AMP is a lot easier in Linux than Windows. For example I just need to do
- Nope, was unable to get Apache running. Or rather, it appeared to be running, but I couldn't get localhost to load. Exploding Boy (talk) 06:32, 30 August 2008 (UTC)
Second wiki question
[edit]I wish to have a personal wiki which is online and, preferrably hosted too. Are there any such sites? --217.227.95.127 (talk) 16:54, 29 August 2008 (UTC)
- Is this the sort of thing you're looking for? --Alinnisawest,Dalek Empress (extermination requests here) 16:58, 29 August 2008 (UTC)
- Roughly, yes. The thing is I don't want to lisense it under "share alike" or any copyleft lisense for that matter. Are there any where I can keep my copyright? Thanks anways, --217.227.94.20 (talk) 18:01, 29 August 2008 (UTC)
- Free sites are unlikely to let you make it private - that's not how they make their money. If you are prepared to pay for hosting, there are many options. The one I happen to use (which I've been very happy with) is http://www.dreamhost.com - if you sign up for a couple of years and pay in advance, it's down under $10 per month and you get vast amounts of space and bandwidth allowance - which increases the longer you stay with them. You can install MediaWiki with a single mouse-click. You have the ability to run multiple web sites from one account - you get free email, etc, etc. Since it's your site - you can do what the heck you like - set whatever rules and licenses you want. I'm sure there are hundreds of other companies offering similar services that are as good as this or better - this is just one of them. SteveBaker (talk) 20:30, 29 August 2008 (UTC)
If you go with Dreamhost I stumbled across a site that gives you like $97 off depending on what plan you get (they run a referal scheme type thing where you have $97 and you can split the referal between getting money yourself and giving your referal a discount, and this is the highest you can set the award, so this person isn't earning anything I think.) The code is quick97 I think (just google it I guess), and isn't mine if anyone wants to know. 88.211.96.3 (talk) 08:39, 1 September 2008 (UTC)
Optical mouse for Linux and Windows
[edit]Hi, I just broke my mouse. I had a mouse which had the plug in Port similar to this one. Can you please give me some information about this mouse? Is it a USB mouse?
I am going to buy a new mouse. Which one do you think will work with both Linux Mint and Microsoft Windows ? I am looking for something really cheap. Thanks -Abhishek (talk) 18:12, 29 August 2008 (UTC)
- That is a PS/2 connector. I don't know if USB mouses are more common, but they are certainly more universal, since some computers, especially laptops, no longer have PS/2 ports. --Russoc4 (talk) 18:14, 29 August 2008 (UTC)
- I haven't had any issues with getting a mouse to work with Linux. What you need is a PS2 mouse. Most mice are USB, but any respectable one will have a USB-to-PS2 converter. Also, any respectable store will let you return the mouse if it doesn't work. -- kainaw™ 18:17, 29 August 2008 (UTC)
- Both PS2 and USB mice should work just fine with any Linux distro less than 3 or 4 years old. Windows 95 doesn't support USB - but everything more recent does. USB is the way of the future - so that's probably a better choice than PS2. As Kainaw points out - many USB mice come with PS2->USB convertor. SteveBaker (talk) 19:55, 29 August 2008 (UTC)
Thanks everyone! Yes, both USB and PS/2 work. I just got one for $3 with a 6 month warranty. -Abhishek (talk) 08:43, 30 August 2008 (UTC)
Saving Hi Def video
[edit]I have jusst bought a sony hi def camcorder. When the 40g hard drive is full how can i save and play more video in hi def?86.10.218.252 (talk) 18:22, 29 August 2008 (UTC)
- Buy another hard drive. You can get an external 500g drive for 100 bucks. All you do is plug it in via USB and it works. --mboverload@ 18:49, 29 August 2008 (UTC)
- With three dollars more, you can get this hard disk from Amazon (with free super saver shipping). =) Kushal (talk) 18:46, 30 August 2008 (UTC)
Checking file extension in Perl
[edit]I'm trying to write a perl script for a personal commons: bot. One of the functions is to check if there is a file extension (jpeg or jpg) entered in variable $new_name. This is needed so that I can rename an old file by using the function rename ($current_name, $new_name)
.
I need
- To check if the extension is (jpe?g)/i.
- If no extension is present, append ".jpg" to the filename, else throw up an error.
I could not find anything like this available online that worked. Could anyone help? =Nichalp «Talk»= 19:07, 29 August 2008 (UTC)
- Your directions are somewhat unclear as far as what is or isn't an error, but the following will add .jpg to a string if it's not already there:
$new_name .= ".jpg" unless $new_name =~ /\.jpe?g$/i;
- --Sean 22:59, 29 August 2008 (UTC)
- Thank you :) I guess I'll skip the error part. =Nichalp «Talk»= 05:51, 30 August 2008 (UTC)
Drivers in Puppy linux and Ubuntu
[edit]When I boot my laptop with Puppy Linux I don't have any problem with my audio. However, recently I installed Ubuntu Hardy Heron and I am not able to take any sound of it.
Is there an easy way to transfer the functioning drivers of Puppy Linux into my Ubuntu installation? —Preceding unsigned comment added by Mr.K. (talk • contribs) 19:14, 29 August 2008 (UTC)
HP spare
[edit]We have an HP Compaq Presario V3019US with an adapter whose spare number is HP SPARE 409843-001. The connector that connects the power at the end of the laptop has separated. Some pictures that I uploaded are here.
Do we need to get the new adapter as a whole or do you think I can fix the connector? If I were to buy it, where should I buy it? This seems to be the best option I have found in my research.
Thanks a million!
Kushal (talk) 23:22, 29 August 2008 (UTC)
- Sure you can fix it. The only VITALLY important thing is that you keep the polarity correct. The wire that connected to the inside of the plug must be connected to the inside of the new plug - the wire that connected to the outside - to the outside. Reversing them could damage the device. So - what you need is to find a plug of the correct size. You may be able to find one at a local Radio Shack store (if you live in the US)...you'll need to VERY carefully label which wire goes to the inside and which to the outside on the broken connector - then cut the broken connector off the end - separate out the two conductors and strip them back to the bare copper for a centimeter or so. Affixing that to the new connector is the problematic part - it's hard to say what that would entail without seeing the connector...it might require soldering. I'm guessing you don't know how to do that - because you wouldn't be asking the question if you could! Replacement power supplies for laptops generally tend to be horribly expensive - but $23 seems like a barguin. At that price - and in your position - I probably wouldn't bother trying to fix the old one. SteveBaker (talk) 03:29, 30 August 2008 (UTC)
- Thanks, Steve. I'd guess I will buy it, then. Thanks again. Kushal (talk) 18:43, 30 August 2008 (UTC)