Sponsored Content
Full Discussion: Help Please
Top Forums Programming Help Please Post 302162227 by KittyWu on Monday 28th of January 2008 10:15:31 AM
Old 01-28-2008
Have I heard "newbie"?
Please, don't feel uncomfortable with this: from what I've read (posts and replies), almost everybody here can be considered as a newbie...

I guess that most of your preceeding experience with programming has taken place on a Windows platform (the EXE, file extension, ...).

Basically (as you might know), filesystems of distinct platforms might be very different.
Remember you're entering a different area with Linux; concerning your request,
I will say "the file extension 'concept' has been trashed for this platform!".

On Linux (or Unix), a file (or a directory) is restricted to a limited number of people (you, the members of your group and the others);
in addition, this is applied for the 3 following kinds of privilege:
. read,
. write,
. execute.

Let's take a example...
Suppose you are into a directory named '/private_data/test', within which
you have stored 3 files:
. readme.txt, (some documentation)
. test.c, (a C source file)
. test (the resulting binary)

me@my_machine> # Where am I?
me@my_machine> pwd
/

me@my_machine> # Go to the test directory
cd /private_data/test

me@my_machine> # What is the content of this directory?
me@my_machine> ls -l
total 14
-rw-r--r-- 1 me my_group 18933 Jan 27 20:16 readme.txt
-rw-r--r-- 1 me my_group 3393 Jan 20 12:00 test.c
-rwxr-xr-- 1 me my_group 24938 Jan 28 15:03 test

Meaning of the '-rwx...':
r (Read) privilege
w (Write) privilege
x (eXecute) privilege
-rwxr-xr-- 1 me my_group 24938 Jan 28 15:03 test
... # 'u': for you, the current User ('me')
... # 'g': for the Group you belong to ('my_group')
... # 'o': the Others

For the '-rwxr--r-- 1 me my_group 24938 Jan 28 15:03 test' item, this means:
. you own the 'test' file,
. you have RWX privileges on it,
. your group has RX privileges on it,
. the others have only R privilege on it,

You can for instance change the privilege of a specific file by using the 'chmod' command:
me@my_machine> chmod o-r test.c # or chmod 640 test.c
me@my_machine> ls -l
-rw-r--r-- 1 me my_group 18933 Jan 27 20:16 readme.txt
-rw-r----- 1 me my_group 3393 Jan 20 12:00 test.c
-rwxr-xr-- 1 me my_group 24938 Jan 28 15:03 test
me@my_machine> # The people outside of your group cannot read anymore the test.c file!

I guess you should know now how to make a file executable (the answer is 'chmod u+x my_file' of course).


Hope it helps,
C.
 
IXPIDE(4)						   BSD Kernel Interfaces Manual 						 IXPIDE(4)

NAME
ixpide -- PCI IDE disk controllers driver SYNOPSIS
ixpide* at pci? dev ? function ? flags 0x0000 DESCRIPTION
The ixpide driver supports the ATI Technologies IXP IDE controller, and provides the interface with the hardware for the ata(4) driver. The 0x0002 flag forces the ixpide driver to disable DMA on chipsets for which DMA would normally be enabled. This can be used as a debugging aid, or to work around problems where the IDE controller is wired up to the system incorrectly. HARDWARE
The supported IDE controllers are o ATI SB200 o ATI SB300 o ATI SB400, Parallel ATA o ATI SB400, Serial ATA o ATI SB700, Serial and Parallel ATA SEE ALSO
ata(4), atapi(4), intro(4), pci(4), pciide(4), wd(4), wdc(4) CAVEATS
Some SB700 controllers can hang under load when Native IDE mode is selected in the system BIOS, but work fine in AHCI mode. BSD
October 16, 2008 BSD
All times are GMT -4. The time now is 05:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy