1. Run "ls -l filename", replacing "filename" with the actual name of the
file you want to know about. At the left of the listing, you will see some
entries that indicate whether the file can be read (r), written to (w), or
executed (x). There are three sets of these, reflecting permissions for the
file's owner, its group, and all users. The absence of a particular
permission will be indicated by a hyphen (-) in place of the r,w, or x. "man
chmod" for more information.
2. Yes. The usual way to do this is with shell scripts. The difference
between DOS and Linux (and Unix) is that in Linux, you need to invoke an
interpreter for the script explicitly. So you would begin your "batch file"
with a line like this:
#!/bin/sh
telling the command-line interpreter to invoke "sh" to interpret the rest of
the script.
After that, the script is a set of commands that are legal for the shell
being invoked (similar to .bat files in DOS). Since "sh' is (on Linux
systems) usually a symlink to "bash", "man bash" is the place to learn
syntax. (This is a VERY long man page, sorta hard to read onscreen.)
At 02:16 PM 2/29/00 +0530, Sandeep Shetty wrote:
> I am a newbie in linux. Can anybody tell be how can we find
>whether a file is executable or not. Can we write things like batch
>files in linux
------------------------------------"Never tell me the odds!"---
Ray Olszewski -- Han Solo
Palo Alto, CA [EMAIL PROTECTED]
----------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs