CQuirke’s Long View

Long lead times need long forward planning

Linux File Attributes

Posted by cquirke on 5 October 2007

Technorati tags:

The chmod command operates on the Linux equivalent to “attributes” in DOS, but the syntax differs from the DOS attrib command.

These attributes (or “modes”?) are conceptually similar, being a bitmapped value with each bit specifying an attribute of the file.  When you do an ls -g to see more details for a directory listing, they are displayed something like this:


Each group of “rwx” corresponds to a single octal digit, i.e. values 4 + 2 + 1.  If the bit is set, the flag is shown; if it is zero, then – is shown instead.  So rwx = 7 and means reading, writing and execution permissions are allowed, whereas r– mean only reading is allowed. 

These permission bits are then repeated for different contexts; from left to right, these are for owner, group and user, according to this syntax reference.

I see there is support for syntax closer to the “Attrib -r -s -h” familiar to DOS users, but I used octal values when I needed to chmod something, e.g…

chmod 0777 menu.lst

chmod 0644 menu.lst

…that result in…





4 Responses to “Linux File Attributes”

  1. Dan Weiser said

    How would Linux act as an underlying support operating system to Windows 98 Second Edition since it already has DOS?

  2. Dan Weiser said

    Well, I am forced to leave from Albuqueurque Public Schools today due to so-called misproper use of their APS email but I am really just a tool in a larger game of huge problems within the district. APS has lost a valuable educational assistant today but just know I was one of the few willing, ready and able males who wanted until now to teach 3rd-5th gtade elementary education. Qwll, perhaps I will do military intelligence for a career or just be a bum, not take advantage of my talents and push carts for the rest of my life. Only The Lord God Knows and only Time Will Tell.

  3. cquirke said

    Hi Dan!

    Normally one thinks of dual-booting two OSs so that you run one or the other, but you can also host one OS within another, as if it were an application within the host OS.

    That’s what Virtual PC and similar things do; to whatever is run within them, it appears as if they have a computer system’s hardware all to themselves. The actual hardware can be quite different, and that’s OK as the virtualized OS never smells the real hardware.

    So what you’d do, is create a virtual machine within Linux or modern Windows, complete with a virtual hard drive (that is really just a file within the host OS). Then you’d either boot a BING CDR within this virtual machine and restore a Win98 installation’s image to the virtual hard drive, or you’d boot a Win98 diskette with DOS CD drivers and install Win98 to the virtual hard drive that way.

    These virtual PCs really do function like real separate PCs. If you want the hosted OS to “see” the rest of the host file system, you have to do that by exposing network shares – and that network access will fail if you unplug the physical LAN cable (even if only because the virtual PC no longer gets an IP address via DHCP). When you boot the virtual PC, you see BIOS POST, and you can boot MemTest86 and it will run without mishap.

    It’s only one step further to emulate the processor, i.e. run non-native code such as that written for the ZX Spectrum, or Apple Mac. Certainly, today’s PCs are fast enough to emulate Win98’s processor if they had to, but currently this is not required; virtual machines combine the efficiency of native processor code with the compatibility of completely hidden hardware.

    Microsoft’s Virtual PC 2007 hosts Win9x very well, and the virtual hardware is Win9x-friendly (Sound Blaster sound card, Intel 440BX chipset motherboard, S3 Trio64 SVGA card). I don’t know what virtual hardware is used within Linux-hosted virtual machines, but I do know such machines are available.

  4. Dan Weiser said

    Thanks I do like Virtual PC 2007 but nothing beats the real thing in my opinion. I also find Dos Box okay for older games but again having the actual operating system on your PC and being able to run it in real time seems to cause less errors than having a virtual operating system especially in the case of games. For example, I tried to run the Sierra Collections in a Windows 98 Virtual PC environment with Microsoft Virtual PC but I think it was the version prior to 2007 so it may not have worked as well. In addition, I heard things like Video Ram was limited to only 1 megabyte within a Virtual Machine setting and is this information correct and if so then the games that you can play within Virtual PC will be limited. Chris, I am looking for a solution here that can meet the needs of gamers like myself, schools that can run their old educational software as well as the final solution of a secure and safe operating system for the U.S. Gov’t and perhaps our friends as well so you can see my work is cut out for me. I hope you are doing well and please forgive any and all venting in your blog and you can rack it up to an annoying and frustrating year of identity theft.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: