So, I recently got an email asking if anyone has ever tranformed a file into a different file. I was curious, and I decided to take a shot at it. I decided to take a shot because I don’t know a lot about this, but I’m willing to bet that the answer is no. I just didn’t know how to go about it, but I thought it could be fun.
Well, its one of those situations where if you know something it is going to make you uncomfortable. So, I decided to do it. I used the Windows command line (I use the cmd.exe) and I ran truncate a file. The file ended up being a.img file, so that’s why I dont know what they did. It ended up creating a file called.img.exe.exe.exe. So that’s the file I got back.
Not that it matters though, because this is the kind of stuff that usually causes you to get fired. So instead of getting fired it got you a little bit closer to that.
I am not sure if truncating is legal. I know the person who did it has been fired from their job from the company because they went into a chat room and found out that the person who did it was talking about what they were doing.
You are right, but here’s the thing: The file you got back will definitely end up on your hard drive. It will be in the directory you’re told to. I don’t know if you can do it on Windows or not, but on a Mac you can if you have Terminal open.
On the Mac, if you go to the terminal, type in truncate, press return and hit enter. You may get a warning that the command is illegal. I assume it’s because it isn’t going to remove the whole file, but in reality it’s going to truncate the file that was being edited. It will make the file smaller than it is, and is technically not a backup, but you can save your work and it will be restored to its original size.
In the future I am sure it will be possible to truncate a file on Mac OS X, and you can use it to restore files from a previous state.
If you have a large file you’re going to truncate, you can use the truncate command to trim the end of the file.
You can also check if a file is truncated by looking at the status line. If it has a status of 0, then its not truncated. If it has a status of 1, then it is truncated.
One of the most common reasons for a file on Mac OS X to be truncated is when you try to open the file with a text editor. When you save a file with a text editor, you’re sending the editor a new file with the same name. However, the truncate command will rename the file to the name you saved it with, so this can take the file name from the file you opened and replace it with another text file.