Sponsored Content
Full Discussion: Real Dummy here!!
Top Forums UNIX for Dummies Questions & Answers Real Dummy here!! Post 1042 by 98_1LE on Tuesday 6th of February 2001 08:29:49 AM
Old 02-06-2001
There are no UNIX dummies, only those who have not been enlightened by it's power! Welcome.

To exectute a program in UNIX, it must first be executable. If the perl script is named msgbd.pl, from the directory where the script is stored, type
ls -l msgbd.pl

You should see something like;

-rwxr-xr-- 1 keith site32 703 Jan 11 12:14 msgbd.pl

What you are looking for is the x in rwxr--r--. This is the permission set associated with this file. It is split into three sets, owner, group, and everyone. This file had read, write and execute for the owner, read and execute for the group, and read for everyone. To make it exectutable for everyone, type;
chmod +x msgbd.pl

To execute the program, cd into the directory where the script is, and type;
./msgbd.pl

The ./ means this directory. It may be in your " search path" and not require the ./, but it may not.

[Edited by 98_1LE on 02-06-2001 at 10:28 AM]
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Dummy Needs Help

I am ftp-ing (I think) files from one computer to another and I am using the Put command to do this. Is there a way for me to string these commands together and Put several files at once? Thanks, Amy (4 Replies)
Discussion started by: amygdala
4 Replies

2. UNIX for Advanced & Expert Users

Using dummy files

what do you record or look for when using these dummy files to test I/O throughput on disk drives. i have no clue and reading from books sure aint helping much. i know all about the creation and every other thing there is to it but when it comes to actual testing, how do i use them this is... (4 Replies)
Discussion started by: TRUEST
4 Replies

3. UNIX for Dummies Questions & Answers

Unix Dummy

i need to learn unix real quick and i have completely no idea how. could anyone please tell me how to get material to get me going??? I am IT oriented. PLEASE ANY ONE???????????????? :confused: (3 Replies)
Discussion started by: quarmenna
3 Replies

4. Shell Programming and Scripting

Dummy need help :(

This drive me nut, any can show me how to do it ?? str1='Case Modify 10001 20002 30003 40004|Report Create 3417176211|Case Modify 10002 20002 30003 40004' and str2='Case Modify 10001' if str1 ~ str2 then str1='Report Create 3417176211|Case Modify 10002 20002 30003 40004' Thanks, (8 Replies)
Discussion started by: sabercats
8 Replies

5. UNIX for Dummies Questions & Answers

question from a dummy

okay so I just started this unix class and understood all the test questions but this "normal" question threy me through a loop :confused:. The question is Why are UNIX commands noninteractive and why is their output not usually preceededby header information? This question has been driving me... (2 Replies)
Discussion started by: cinnamonbear
2 Replies

6. UNIX for Dummies Questions & Answers

Curious Dummy

I have a website but I do not for the life of me know how to upload using unix based command lines. Can someone send me a good site that has these commands. That and I am curious to know more about command line based interfacing. :D Curious Dummy (1 Reply)
Discussion started by: highway39
1 Replies

7. UNIX for Dummies Questions & Answers

using grep for a dummy

Hi there; I am really new in unix. I need some help regarding use of grep command. I need to write a shell script which takes a C++ program and counts the number of words which could be a valid C++ variable name. I wrote a regular expression to find c++ variable names: ^* but... (3 Replies)
Discussion started by: mkosucu
3 Replies

8. UNIX for Beginners Questions & Answers

Dummy Question

Where can I get UNIX? (1 Reply)
Discussion started by: ciao303
1 Replies
ACCESS(2)							System Calls Manual							 ACCESS(2)

NAME
access - determine accessibility of file SYNOPSIS
#include <sys/types.h> #include <unistd.h> #define R_OK 4/* test for read permission */ #define W_OK 2/* test for write permission */ #define X_OK 1/* test for execute (search) permission */ #define F_OK 0/* test for presence of file */ int access(const char *path, mode_t mode) DESCRIPTION
Access checks the given file path for accessibility according to mode, which is an inclusive or of the bits R_OK, W_OK and X_OK. Specify- ing mode as F_OK (i.e., 0) tests whether the directories leading to the file can be searched and the file exists. The real user ID and the group access list (including the real group ID) are used in verifying permission, so this call is useful to set- UID programs. Notice that only access bits are checked. A directory may be indicated as writable by access, but an attempt to open it for writing will fail (although files may be created there); a file may look executable, but execve will fail unless it is in proper format. RETURN VALUE
If path cannot be found or if any of the desired access modes would not be granted, then a -1 value is returned; otherwise a 0 value is returned. ERRORS
Access to the file is denied if one or more of the following are true: [ENOTDIR] A component of the path prefix is not a directory. [ENAMETOOLONG] The path name exceeds PATH_MAX characters. [ENOENT] The named file does not exist. [EACCES] Search permission is denied for a component of the path prefix. [ELOOP] Too many symbolic links were encountered in translating the pathname. (Minix-vmd) [EROFS] Write access is requested for a file on a read-only file system. [EACCES] Permission bits of the file mode do not permit the requested access, or search permission is denied on a component of the path prefix. The owner of a file has permission checked with respect to the ``owner'' read, write, and execute mode bits, members of the file's group other than the owner have permission checked with respect to the ``group'' mode bits, and all others have permissions checked with respect to the ``other'' mode bits. [EFAULT] Path points outside the process's allocated address space. [EIO] An I/O error occurred while reading from or writing to the file system. SEE ALSO
chmod(2), stat(2). 4th Berkeley Distribution May 22, 1986 ACCESS(2)
All times are GMT -4. The time now is 06:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy