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.
 
INADYN.CONF(5)						   File formats and conventions 					    INADYN.CONF(5)

NAME
inadyn.conf - configuration for the inadyn client for open DNS servers. DESCRIPTION
inadyn can read the very same options which can be present in the command line from a configuration file. This feature allows the user to write the options only once, and avoids frequent retyping. The format of the file follows the *NIX tradition: a '#' character denotes a comment. The long options (those with '--' in front) can also be placed at the beginning of the line without '--' signs. a can be used as an escape character. EXAMPLES
1. #Some comment about inadyn cfg file --username test --password test --update_period 60000 --alias test.homeip.net --alias my.second.domain 2. --username test # user --password test update_period 60000 # some other param without '--' alias test.homeip.net SEE ALSO
Other manual pages inadyn(8). Internet resources Inadyn 's home page is http://inadyn.ina-tech.net. <> AUTHOR
inadyn was written by Narcis Ilisei, <inarcis2002@hotpop.com>. This manual page was written by Shaul Karl, <shaul@debian.org>, for the Debian GNU/Linux system, based on the readme.html file that is found in the source. Linux applications January, 2005 INADYN.CONF(5)
All times are GMT -4. The time now is 11:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy