Hi
I am trying to use shell script to display file permissions, and I can do it fine for the current user logged in, but now I want to view all file permissions for the Owner of the file, Group users and everyone, so it will look something like this:
-----------------READ WRITE EXECUTE
OWNER Username ---YES---YES---NO
GROUP USERS ---YES---NO---NO
EVERYBODY ---NO----NO---NO
Below is what I have so far.
so my question is how do I find out the other permissions of the file?.
how would i search the strings like rwxr-wr--, or put it in a variable. if i can achieve this i can just search the string for certain characters and print out statment based on those characters.
I started working here last week, and it’s a trainee position, where I am expected to under take a course which is involves doing these tedious tasks as part of the job, my boss is kinda my teacher, I should have said mentor though its still the same thing.
And doesn’t want me using awk or sed as they “promote laziness from programmer prospective” -_-
is it possible to redirect the string of permissions like rwxr-wr-- to a variable/tmp?
I have input data looks like this which is a part of a csv file
7,1265,76548,"0102:04"
8,1266,76545,"0112:04"
I need to make the output data should look like this and the output data will be part of text file:
7|1265000 |7654899 |A|
8|12660000 |76545999 |B|
The logic behind the... (6 Replies)
Hi,
For a particular set of files, am trying to check if they are writable. i.e., checking whether they are having permissions greater than 755.
Am able to check this using the statement:
"if (os.path.isfile(FILE_PATH) and (os.stat(FILE_PATH).st_mode & 0777) == 0777):"
But the problem... (1 Reply)
Hi,
For a particular set of files, am trying to check if they are writable. i.e., checking whether they are having permissions greater than 755.
Am able to check this using the statement:
"if (os.path.isfile(FILE_PATH) and (os.stat(FILE_PATH).st_mode & 0777) == 0777):"
But the problem here... (0 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
1. Write a shell script that will work with a file from the command line.
The program should:
a. Check... (4 Replies)
Hi friends
please help me on below,
i have 5 files like below
file1 is
x 10
y 20
z 15
file2 is
x 100
z 245
file3 is
y 78
z 23
file4 is
x 100 (3 Replies)
hi All,
my query...
1.I Have to search for the files in the root directory.
2.i have to search for a pattern in all the files in the root directory and then replace them with a new pattern.
3.Rename the file
Explanation:
if ABC is the root folder and has 3 subfolders and there are 15... (9 Replies)
Hi Pals,
I need some information related .def file in HP-Ux shell scripting. What actaully a .def file contains. It is having all definitions of some functions. But what is the relationship between a .def file and shell script. Can anyone give some examples.
Thanks in Advance.
Best... (1 Reply)
I am trying to find a way to check the current status of a file. Such as some cron job processes are dependent on the completion of others. if a file is currently being accessed / modified or simply open state I will wait until it is done being processed before attempting the next process on that... (3 Replies)