Sponsored Content
Operating Systems OS X (Apple) Logic of owner of directory or file Post 302595331 by cowLips on Thursday 2nd of February 2012 07:52:23 PM
Old 02-02-2012
Logic of owner of directory or file

Would the owner as listed , be the one who made the directory in the first place. when any one could use chown in a script.
I do not know where this directory came form or who made it. And am attempting to just find out more info on it.
what could i use to find its origins and its why does it exist.
Code:
joe:~ treesalt$ ls Library/Voices
joe:~ treesalt$ ls -la Library/Voices
total 0
drwx------+  2 treesalt  staff    68 Oct  9 22:02 .
drwx------+ 32 treesalt  staff  1088 Feb  2 15:52 ..
joe:~ treesalt$ ls -e Library/Voices
joe:~ treesalt$ ls -l Library/Voices
joe:~ treesalt$ ls -a Library/Voices
.	..
joe:~ treesalt$ ls -lse Library/Voices
joe:~ treesalt$ ls -L Library/Voices
joe:~ treesalt$ ls -u Library/Voices
joe:~ treesalt$ ls -la Library/Voices/.
total 0
drwx------+  2 treesalt  staff    68 Oct  9 22:02 .
drwx------+ 32 treesalt  staff  1088 Feb  2 15:52 ..
joe:~ treesalt$ ls -la Library/Voices/*
ls: Library/Voices/*: No such file or directory
joe:~ treesalt$

any assistance ?
------
i was just over at: homework and course questions
topic: Unix ls command question
and saw a suggestion of using du
Code:
joe:~ treesalt$ du -a Library/Voices
0	Library/Voices
joe:~ treesalt$ du -H Library/Voices
0	Library/Voices
joe:~ treesalt$ du Library/Voices
0	Library/Voices
joe:~ treesalt$ du -c Library/Voices
0	Library/Voices
0	total
joe:~ treesalt$ du -L Library/Voices
0	Library/Voices

as well as a suggestion to cd into another directory and then ls the directory in question.
Code:
joes:Desktop treesalt$ ls -la ../Library/Voices
total 0
drwx------+  2 treesalt  staff    68 Oct  9 22:02 .
drwx------+ 32 treesalt  staff  1088 Feb  2 15:52 ..

with the number of links i just wonder ? what the ? is going on here.

Thank you.
any reference on books in bash for the mac.

Last edited by cowLips; 02-02-2012 at 09:32 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

determine owner directory permissions from within the directory

From within a directory, how do I determine whether I have write permission for it. test -w pwd ; echo ? This doesn't work as it returns false, even though I have write permission. (4 Replies)
Discussion started by: Sniper Pixie
4 Replies

2. Solaris

Owner of file gets 'not owner' error for chgrp

Hi Folks, I know that changing users and groups is pretty basic admin, but this one has got me stumped. When I try to change the group of a file for which I am the owner for, it still gives me a 'Not owner' error. For example, when I am logged in as 'webadmin', I have the following file: ... (4 Replies)
Discussion started by: brizrobbo
4 Replies

3. Shell Programming and Scripting

to parse a directory and its subdirectories and find owner name of files

hi all, i need to capture all the files in a directory and its subdirectories that have owner name different than the root owner. for one file it is " stat -c %U filename " but i need to search for each and every file and record it. thanks in advance (14 Replies)
Discussion started by: vyasa
14 Replies

4. UNIX for Dummies Questions & Answers

How to display only Owner and directory/sub directory names under particular root

hai, I am new to Unix, I have a requirement to display owner name , directory or sub directory name, who's owner name is not equal to "oasitqtc". (here "oasitqtc" is the owner of the directory or sub directory.) i have a command (below) which will display all folders and sub folders, but i... (6 Replies)
Discussion started by: gagan4599
6 Replies

5. UNIX for Dummies Questions & Answers

Group files by owner and show directory

Hello, i would like to find huge files and group them by owners. To find big files i use this command: ls -lR | sort -bnr +4 | head -n 75 which give me 75 biggest files, then i need to see in which subdirectory is every file. second thing i dont know is how to group those files by owner, could... (6 Replies)
Discussion started by: dealer1985
6 Replies

6. UNIX for Dummies Questions & Answers

Delete directory from ghost owner with awk

Hi all Unix gurus :) I really need urgent help with deleting ghost (owner is only numbers) accounts on our OS X server in users home directory. I get this ghost accounts after deleting a user from Workgroup Manager. I have done a script that I can see this ghost accounts with: ls -la |... (4 Replies)
Discussion started by: macguy
4 Replies

7. AIX

Unix root directory owner wrong AIX 5.3

The a chown was done and instead of using ./ a / was used and root ownership files got changed. I need to change the ownership of the files/directory back - backups are not working and I am concerned a reboot will not be successful. Can anyone provide the ownership of these files/directories... (6 Replies)
Discussion started by: spike1
6 Replies

8. Solaris

Changing file/directory owner

Hi , I want to change owner of files or folder from 23186 to dsadm, Present ------- -rw-r--r-- 1 23186 gdstage 10240 Oct 31 2007 BLTRS drwxrwxrwx 3 23186 gdstage 512 Sep 1 2010 sql Required as ----------- -rw-r--r-- 1 dsadm gdstage 10240 Oct 31 2007 BLTRS drwxrwxrwx 3 dsadm gdstage... (6 Replies)
Discussion started by: sridhardwh
6 Replies

9. Solaris

Privileges : modify dir/file owner by other that's not owner

i need to do the following operations in solaris 10: 1.change owner and group owner for files which are not owned by the current user and user group 2.to can delete files in the /tmp directory which are not of the current user 3. allow to a standard user the deletion of files in the /tmp... (1 Reply)
Discussion started by: sirmark
1 Replies

10. AIX

How to set owner and permission for files/directory in directory in this case?

Hi. My example: I have a filesystem /log. Everyday, log files are copied to /log. I'd like to set owner and permission for files and directories in /log like that chown -R log_adm /log/* chmod -R 544 /log/*It's OK, but just at that time. When a new log file or new directory is created in /log,... (8 Replies)
Discussion started by: bobochacha29
8 Replies
APPLY(1)						      General Commands Manual							  APPLY(1)

NAME
apply - apply a command to a set of arguments SYNOPSIS
apply [ -ac ] [ -n ] command args ... DESCRIPTION
Apply runs the named command on each argument arg in turn. Normally arguments are chosen singly; the optional number n specifies the num- ber of arguments to be passed to command. If n is zero, command is run without arguments once for each arg. Character sequences of the form %d in command, where d is a digit from 1 to 9, are replaced by the d'th following unused arg. If any such sequences occur, n is ignored, and the number of arguments passed to command is the maximum value of d in command. The character `%' may be changed by the -a option. Examples: apply echo * is similar to ls(1); apply -2 cmp a1 b1 a2 b2 ... compares the `a' files to the `b' files; apply -0 who 1 2 3 4 5 runs who(1) 5 times; and apply 'ln %1 /usr/joe' * links all files in the current directory to the directory /usr/joe. SEE ALSO
sh(1) AUTHOR
Rob Pike BUGS
Shell metacharacters in command may have bizarre effects; it is best to enclose complicated commands in single quotes ' '. There is no way to pass a literal `%2' if `%' is the argument expansion character. 4.2 Berkeley Distribution April 29, 1985 APPLY(1)
All times are GMT -4. The time now is 07:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy