
On 17/07/2014 8:48 PM, Russell Coker wrote:
On Thu, 17 Jul 2014 20:19:24 Erik Christiansen wrote:
Is this still the thread on which:
$ rm windows 7
The irony here is that Windows 7 (as with pretty much all versions of Windows) creates directories with spaces in the names such as "My Programs" and uses them for important things. This combined with the fact that Windows in a default configuration doesn't have any sort of filename completion functionality is a PITA when you want to use a cmd.exe session.
Actually Windows uses junctions and links as well as desktop.ini files to handle directories in strange ways .... what you see is not necessarily what it is. And other things are /adjusted/ from registry values. Here's an example "location" value for "My Pictures" C:\Users\andrewm\Pictures C:\Users\andrewm\Pictures>type desktop/ini The syntax of the command is incorrect. C:\Users\andrewm\Pictures>type desktop.ini [.ShellClassInfo] LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21779 InfoTip=@%SystemRoot%\system32\shell32.dll,-12688 IconResource=%SystemRoot%\system32\imageres.dll,-113 IconFile=%SystemRoot%\system32\shell32.dll IconIndex=-236 So, as a directory in cmd, it is just "Pictures", but in Explorer, it presents as "My Pictures" due to the content of the desktop.ini file. And this shows the "Documents" directory using a junction to allow access via either name: C:\Users\andrewm>dir/a|grep -i documents 27/05/2014 05:26 PM <DIR> Documents 15/06/2012 06:28 AM <JUNCTION> My Documents [C:\Users\andrewm\Documents] [and yes, I have GnuWin32 progs installed] The junctions come in to play to cater for different file locations in different Windows versions -- you could use the *new* location directory tree or the old one and they both work (just link sym links). There's even another concept for storing directories and/or files in VirtualStore directories that can be confusing if you don't know what is going on. In Windows you can create a directory or file in areas that you shouldn't be able to create such nodes, if you run the dir command, then you won't see them, but you can still operate on them. Windows silently stores them in the VirtualStore -- this has to do with 32 bit programs vs 64 bit programs. For instance you can create files with gpg (32 bit program) at the top level of the C:\ volume, you cannot see them there, but you can read and write from/to them. C:\>cd \Users\andrewm C:\Users\andrewm>copy con aaa.txt aaa bbb ccc ^Z 1 file(s) copied. C:\Users\andrewm>cd \ C:\>gpg --symmetric -a -o c:\aaa.gpg c:\users\andrewm\aaa.txt C:\>dir c:\aaa.gpg Volume in drive C has no label. Volume Serial Number is 88E2-2CCE Directory of c:\ File Not Found C:\>dir c:\Users\andrewm\AppData\Local\VirtualStore\aaa.gpg Volume in drive C has no label. Volume Serial Number is 88E2-2CCE Directory of c:\Users\andrewm\AppData\Local\VirtualStore 19/07/2014 08:31 AM 227 aaa.gpg 1 File(s) 227 bytes 0 Dir(s) 43,772,989,440 bytes free C:\>gpg -d c:\aaa.gpg gpg: AES256 encrypted data gpg: encrypted with 1 passphrase aaa bbb ccc C:\> NB: the created gpg file was operated on at the c:\ level, but the file was actually /stored/ in the VirtualStore folder. Cheers AndrewM