10-19-2007
Quote:
Originally Posted by
Kymmers7
Seems simple but I am having difficulty with this one: I am trying to write a single command line argument (which will be a path) - the program should print out the owner of the path.
I can not get anything I write to run.
Please help.
Sorry, could you please be more descriptive.
To find the owner of the path. -- path could either be a file or a directory.
Did you mean finding the owner of the file or a directory ?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi there,
I am a student and currently working on a project. I have a file that contains about 50 filenames. (1.txt, 2.txt, 3.txt ...).
I would like to know how can I store these filenames into a variable using a loop?
I would appreciate if anyone can help me. Thank You.
Regards,
Bib (4 Replies)
Discussion started by: coolbib
4 Replies
2. UNIX for Dummies Questions & Answers
I'm relatively new at this scripting game, just need to learn some basic stuff for data handling.
My current need is to write a script that loops through a textfile of filenames, and for each file removes the first line and re-writes that file to a new name.
In fact I could do with knowing... (1 Reply)
Discussion started by: mattyjim2
1 Replies
3. Shell Programming and Scripting
I have written a script that will email a generic user when a device is "offline". I would like to enhance this by having the script lookup a contact's email and automatically add it to the MAIL_LIST. I am trying to lookup and return data based on a field common in two files
File 1 ... (0 Replies)
Discussion started by: irishluck66
0 Replies
4. Shell Programming and Scripting
hi all,
i am just getting in to bash scripting, so don't be too harsh...
i've created this little backup script, and it's just awfull... ugly, doesn't work like I want it to, the works. anyways, i was hoping some of you might help me improve it and learn a little in the process.
what i... (13 Replies)
Discussion started by: jmd9qs
13 Replies
5. Shell Programming and Scripting
Could someone please recommend a very good shell scripting book for me. I would be starting a new job that would require a very good understanding of shell scripting. Please help. (3 Replies)
Discussion started by: ayoka
3 Replies
6. Shell Programming and Scripting
Hi,
I am newbie in shell scripting
I have a file name like simple.txt which comes from Mainframe systems onto windows dir every 15 minutes daily. File name is same. Every 15 minutes it updates.
I need to write shell script to check if the file arrived every 15 min or not.
If the new file... (4 Replies)
Discussion started by: chinniforu2003
4 Replies
7. Shell Programming and Scripting
Hi Guys, I want to create a shell script to run multiple jobs in sequence.
Explaination -
If I were to run each jobs individually I would have gone to folder - "abin"(where my shellscript is place) as follows
cd abin
abin > runappeng.sh abc001
Now, I have list of programs which are like... (8 Replies)
Discussion started by: chaits84
8 Replies
8. Shell Programming and Scripting
Howdy folks,
I'm trying to craft a log file summarisation tool for an application that creates a lot of duplicate entries with only a different suffix to indicate point of execution. I thought I'd gotten close but I'm clearly missing something.
Here's a genericized version:
A text_file... (3 Replies)
Discussion started by: mthespian
3 Replies
9. Shell Programming and Scripting
Hi all,
I have drill to do and I'll very appreciate your help:
Please create a simple CSV file as follow (3 columns and 4 rows):
A,B,C
A,”B,C”,D
“A,B”,C,D
o A,B,”C,D”
- Please refer to the comma between the quotation marks as a parameter and not as a separator.
- Please provide... (3 Replies)
Discussion started by: elior
3 Replies
10. Shell Programming and Scripting
Please bear with me, I'm a beginner but have had some experience and decent knowledge to understand things as I read them and I'm in the process of trying to learn more. I recently inherited a UNIX server which has a bash script which is part of a crontab schedule that needs to be modified (or... (3 Replies)
Discussion started by: Danylko
3 Replies
LEARN ABOUT DEBIAN
rfio_chmod
RFIO_CHMOD(3) Rfio Library Functions RFIO_CHMOD(3)
NAME
rfio_chmod, rfio_fchmod - change access mode of a directory/file
SYNOPSIS
#include <sys/types.h>
#include "rfio_api.h"
int rfio_chmod (const char *path, mode_t mode);
int rfio_fchmod (int s, mode_t mode);
DESCRIPTION
rfio_chmod sets the access permission portion of the mode of a directory/file to the bit pattern in mode.
rfio_fchmod is identical to rfio_chmod but works on the file descriptor s returned by rfio_open.
path specifies the logical pathname relative to the current directory or the full pathname.
mode is constructed by OR'ing the bits defined in <sys/stat.h> under Unix or "statbits.h" under Windows/NT:
S_IRUSR 0000400 read by owner
S_IWUSR 0000200 write by owner
S_IXUSR 0000100 execute/search by owner
S_IRGRP 0000040 read by group
S_IWGRP 0000020 write by group
S_IXGRP 0000010 execute/search by group
S_IROTH 0000004 read by others
S_IWOTH 0000002 write by others
S_IXOTH 0000001 execute/search by others
The effective user ID of the process must match the owner of the file or be super-user. If a directory is writable and has the sticky bit
set, files/directories within that directory can be removed or renamed only if:
the effective user ID of the requestor matches the owner ID of the file or
the effective user ID of the requestor matches the owner ID of the directory or
the file is writable by the requestor or
the requestor is super-user.
RETURN VALUE
This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, serrno is set appropriately.
ERRORS
EPERM The effective user ID does not match the owner of the file and is not super-user.
ENOENT The named file/directory does not exist or is a null pathname.
EBADF s is not a valid file descriptor.
EACCES Search permission is denied on a component of the path prefix or write permission on the file itself is denied.
EFAULT path is a NULL pointer.
ENOTDIR A component of path prefix is not a directory.
ENAMETOOLONG The length of path exceeds CA_MAXPATHLEN or the length of a path component exceeds CA_MAXNAMELEN.
SENOSHOST Host unknown.
SENOSSERV Service unknown.
SECOMERR Communication error.
SEE ALSO
Castor_limits(4)
AUTHOR
LCG Grid Deployment Team
LCG
$Date: 2005/03/31 13:13:02 $ RFIO_CHMOD(3)