Wikipedia:Reference desk/Archives/Computing/2017 October 7
Computing desk | ||
---|---|---|
< October 6 | << Sep | October | Nov >> | Current desk > |
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. |
October 7
editWindows 10 Shred
editIf I place a cursor on a file directory (folder) and right click on the mouse I expect to see "disconnect" if that is an external hard drive or a DVD drive. I don't see it. What I see is "Shred."
What is the Shred in this context? --AboutFace 22 (talk) 00:12, 7 October 2017 (UTC)
- Sounds like a more thorough version of deletion, like a paper shredder, so I would only test it on a folder you don't care about. StuRat (talk) 00:43, 7 October 2017 (UTC)
- Most likely, it is a Context Menu Extension provided by third-party (non-Microsoft) software.
- "File shredding" is a fancy name for deleting a file, and then making sure it stays really deleted and can't be brought back.
- A lot of 3rd-party software exists to provide "secure file deletion" features. A lot of that software is based on fairly unsound, unscientific ideas about the file system and its physical manifestation in real hardware. A non-trivial percentage of "secure file deletion" software is trojan horse-style malware. Most of it is just benign, useless clutter that promotes certain pervasive old-wives-tales about information security.
- Evidently, what-ever software is providing "file shredding" on your computer is implemented so poorly that it thinks it can "shred" a DVD - which is, for the most part, impossible - DVDs are a read-only file system - hence, DVD-"ROM" (read-only memory). Windows won't let you write to a normal DVD, let alone delete files from it.
- At this time, there is no sound reason for a user of a mainstream system like Windows to believe that any software does a better job at "delete" than the built-in feature provided by their operating-system.
- Nimur (talk) 00:47, 7 October 2017 (UTC)
- There are definitely programs which do this. Windows deletes the filesystem's information on a file but not the actual data which makes up the file, meaning it can be recovered. Programs like PeaZip can zero-delete a file (overwrite the file with a string of zeroes, so that no software can recover it from the hard drive) or secure-delete (repeatedly overwrite it with random digits such that even specialist forensic hardware will be unable to read the original data). There is a wiki article about the security consequences of nominal file deletion here.Speedstyle101 (talk) 11:29, 7 October 2017 (UTC)
- Citation needed? Why do you believe Windows does not delete the "actual data" of a file? Why do you believe that another program does delete the "actual data"? Why do you believe that overwriting data with "zero" is identical to deleting the data? These are strong statements with significant technical consequences. Variations on this theme are frequently repeated without any factual basis.
- Here's a conference paper on data remnance.
- Here's another tech note on security considerations pertaining to User Experience Virtualization. Files can be replicated; redundantly committed to multiple storage media; transmitted over a network to a backing service; and so on. There is no way that application software can possibly be aware of all possible copies of a block of data - so even if we accepted the dubious claim that file data needs be "zeroed out" one or more times, the application can't know where all the copies are! It can't write zeros over data copies that it doesn't know about!
- The take-away message is simple: only your operating system knows how data is permanently committed to the file system and its backing storage media. If you cannot trust your operating system, then you can not be assured that your data is securely "gone."
- In practice, you should worry less about deleting, and more about encrypting. If your data is securely encrypted, it does not even need to be deleted. If someone gets a copy of the file, but they do not have the means to decrypt the contents, then the data is "gone" even if it isn't zeroed. Securely encrypted data is indistinguishable from an "empty" file - and on a modern computer system, neither is filled with "all zero"!
- Nimur (talk) 13:08, 7 October 2017 (UTC)
- File systems almost universally don't touch the file data when deleting a file; they just nuke the file system metadata that marks the file. (In Unix-land, this means the file inode(s) is/are unlinked. The libc function to do this is even called
unlink()
. And because of how Unix works, the file isn't even freed if any processes still have it opened.) So I think it's accurate to say that typically the "actual data" is not erased. Your other points are relevant, especially with the increasing use of cloud storage (like Microsoft's own OneDrive) which can copy users' data automatically. In a nutshell: if you care at all about other people having access to your data, encrypt it, and ensure it's encrypted if copied to any other storage medium, like an online backup provider. --47.138.160.139 (talk) 20:08, 8 October 2017 (UTC)
- File systems almost universally don't touch the file data when deleting a file; they just nuke the file system metadata that marks the file. (In Unix-land, this means the file inode(s) is/are unlinked. The libc function to do this is even called
- There are definitely programs which do this. Windows deletes the filesystem's information on a file but not the actual data which makes up the file, meaning it can be recovered. Programs like PeaZip can zero-delete a file (overwrite the file with a string of zeroes, so that no software can recover it from the hard drive) or secure-delete (repeatedly overwrite it with random digits such that even specialist forensic hardware will be unable to read the original data). There is a wiki article about the security consequences of nominal file deletion here.Speedstyle101 (talk) 11:29, 7 October 2017 (UTC)
So, it looks like there is no "eject" anymore, only "shred." You know Windows software is getting more and more difficult to use. --AboutFace 22 (talk) 16:13, 7 October 2017 (UTC)
Well, I think I can enlighten you guys a little. I figured out that "Shred" appears to be McAfee malware. I use Spybot Search and Destroy, paid version, for antivirus and computer protection in general, however McAfee installed their exec without my knowledge and permission once I purchased this HP Pavilion Windows 10 computer. Once in a while I see a popup saying that my subscription has expired. I ignore that. Now I just found an empty folder and decided to shred it. Once I clicked "Shred" in the right click menu, A big McAfee popup came up offering me parameters for the shredding and a hint that I should purchase the full McAfee for this shred to work. I closed the popups and deleted the folder. It worked. --AboutFace 22 (talk) 17:26, 7 October 2017 (UTC)
- Isn't that what everyone told you? (Well we had no idea what software it was coming from, but it was fairly obvioust it wasn't a prt of Windows itself.) Nil Einne (talk) 11:53, 8 October 2017 (UTC)
- McAfee was almost certainly pre-installed on your computer by the manufacturer. They pay manufacturers to install their software, hoping to get customers who buy the computers to purchase subscriptions. --47.138.160.139 (talk) 20:08, 8 October 2017 (UTC)
- Some McAfee products are sneakily pushed as "optional offers" (with the option to install them selected by default) when you download Adobe Flash, so it may have sneaked onto the computer that way. AndrewWTaylor (talk) 20:31, 8 October 2017 (UTC)
Java: serialize one version of a class, deserialize another
editIs it possible, within a single Java process, to instantiate one version of a class, serialize the object to a ByteArrayOutputStream, and ensure that it deserializes as an instance of a different version of the class when read back in from a ByteArrayInputStream wrapping the output stream's array? What examples are available of how to do so? (What I want this for is unit testing; for instance, to test a readObjectNoData() method, I'll need a class to gain a new parent class between serialization and deserialization.) NeonMerlin 05:29, 7 October 2017 (UTC)
- Wikipedia is great and all, but go to Stack Overflow for this sort of thing. Speedstyle101 (talk) 11:31, 7 October 2017 (UTC)
DNS resolution of 'subdomains'
editExample, a Minecraft server called "grimworld.serv.nu" cannot be resolved; I can't ping it, and DNS lookup shows "DNS Error - No A records exist for grimworld.serv.nu".
So how come I can connect to it from within the game, which connects to port 25565? What IP address is it connecting to, and how is the traffic being passed?
As I understand it, there are many servers hosted as SOMETHING.serv.nu. So do they somehow redirect traffic to the correct one, depending on the subdomain? Am I actually connecting to just serv.nu, and being passed through to the right server (presumably on different ports)? — Preceding unsigned comment added by 86.20.193.222 (talk) 17:46, 7 October 2017 (UTC)
- How does Minecraft talk to the server? Have you packet-sniffed this?
- My suspicion is that Minecraft doesn't use "grimworld.serv.nu" as a DNS subdomain, it only uses serv.nu (which DNS understands and can resolve). Internally to the Minecraft application protocol, it passes "grimworld" as a parameter within that.
- Your port is probably allocated dynamically on the basis of a session, not tied long-term to a particular subdomain. Two clients might connect to that subdomain and be given different ports for it. Andy Dingley (talk) 09:38, 9 October 2017 (UTC)
- Hi Andy, thanks for responding.
Minecraft is only communicating with it on TCP, port 25565. I know that, because it has to be permitted through a firewall, and from all documentation I've seen about it.
You can run your own server, and it defaults to that port number - or you can specify it in a 'server.properties' file. Your friends can connect to you, using your external IP address - or, of course, you can pay for domain registration services.
Most servers (as far as I know) just resolve their IP address in the normal way, to a normal address which reponds to "ping", gives DNS info, and so on; for example, minecove.org, play.lokamc.com, mc.drugrun.net - those are random examples out of many thousands.
There is a small utility that can check if the server is online by sending a specific RCON query to that same port; an example of it in operation is here (and source available)
https://dinnerbone.com/minecraft/tools/status/ — Preceding unsigned comment added by 86.20.193.222 (talk) 10:10, 9 October 2017 (UTC)
- Well that tool doesn't seem to show grimworld.serv.nu as working. Barring Andy Dingley being write or an insane TTL (did you try to ping and connect to the server on the same computer?), an obvious question, are you sure you're connecting to the hostname grimworld.serv.nu in Minecraft? If it's a saved server, are you making sure you're looking at the actual hostname that it's using to connect? If you're looking at the server description, I could say my server hostname is i.am.notch in the description, but it wouldn't make it so (not least because I suspect there's no notch GTLD). The server having a different hostname from grimworld.serv.nu stored inside Minecraft perhaps isn't that likely (unless Minecraft has some sort of update mechanism), but it having an IP stored rather than the hostname seems easily possible. It's also possible, although I find this unlikely, that Minecraft stores both a hostname and IP for the server, and if the hostname doesn't work tries the port. Assuming that serv.nu or Minecraft doesn't require the correct hostname for the Minecraft server to know which particular game service you're trying to connect to (like many web servers do need), having the IP would work. Nil Einne (talk) 16:20, 10 October 2017 (UTC)
Yes, I am using the same computer - the one I am writing on now. I am not using a stored server name. I can, now, in Minecraft, "Direct Connect" to "grimworld.serv.nu" and it works fine. Yet I cannot ping it, I can't even resolve the IP addresss to anything.
Still an issue 13 Oct
Sorry for large; but - example, I cannot ping "mineblock.serv.nu", it says "Name or service unknown". But I can connect to it. How come?
Meaning date command in Linux
editWhy is it, for example:
date +"%T"
and not, just
date -T
Why bother to type a + or %? What does these mean syntactically?--Hofhof (talk) 19:15, 7 October 2017 (UTC)
- Try "man date" or better still, "info date". "+" means, use the current time/date. The string is a format with "%T", "%A", "%y", etc., place holders for various bits of date/time information. You can do stuff like
date +"The calendar says it's %A and the clock says it's %T"
- that you wouldn't be able to do with ordinary command line options. --Wrongfilter (talk) 19:35, 7 October 2017 (UTC)
- To elaborate, that's the syntax the creators of the
date
command decided to use, so, as demonstrated, you can do more complex stuff. The syntax is almost certainly patterned after C's printf function. People not familiar with the Unix world sometimes don't realize this, but the-X
convention for command-line arguments is just that, a convention that software authors voluntarily adhere to. It isn't enforced by the kernel or any other part of the operating system. The arguments are just passed as strings byexec
to the program, and it's up to the program to interpret them however it wants. --47.138.160.139 (talk) 20:21, 8 October 2017 (UTC)
- To elaborate, that's the syntax the creators of the
- To elaborate a bit more, it's based on the C library strftime call, which is itself loosely based on printf.
- But it's not exactly the same as strftime, and it's got extensions that strftime doesn't have, like %s.
- I can't explain why it's date +fmt; a slightly more conventional invocation would have been date -f fmt or something. —Steve Summit (talk) 18:03, 12 October 2017 (UTC)