I have a list which contains all the jar files shipped with the product I am involved with. Now, in this list I have some jar files which appear again and again. But these jar files are present in different folders.
My input file looks like this
/path/1/to a.jar
/path/2/to a.jar
/path/1/to... (10 Replies)
Looking for a command which shows the current path of other users.
Similiar to the PWD command.
Need to be able to see which part of the system the user is logged on to.
Thanks
G (1 Reply)
How can i list every single file on a sun solaris server running 2.8 starting from '/' with the full path included in it?
example.
/
...
...
...
/etc/inetd.conf
/etc/passwd
/etc/shadow
...
...
...
/var/adm/messages
/var/adm/messages.0
/var/adm/messages.1
...
...
...... (4 Replies)
Hi
I am writing a script to find the list of files in dir1 and my script is place in dir2
while doing ls of files dir1 it is displaying with path. I would like to omit the path and display the only file name so that I can pass it to my script as arguments.
for filename in ... (2 Replies)
Hi all,
How to save file full name to a file. I tried the following but don't know to include path name.
$ ls -l | awk '{print $9}' > outputfile.dat
$ cat outputfile.dat
fifth.txt
first.txt
fourth.txt
second.txt
third.txt
My wanted result is ie:
... (3 Replies)
This has been bugging me for a while. How can i list file to show full path.
/directory/test
$ ls file.tst
file.tst
$
desired output:
/directory/test/file.tst (2 Replies)
Please help, I want script to check filename, size and date in specify path.
I want output as:
DATE: YYYYMMDD HH:MM
------------------------------------------------
fileA,filesize,yyyy mm dd HH:MM
fileA,filesize,yyyy mm dd HH:MM
fileA,filesize,yyyy mm dd HH:MM
fileA,filesize,yyyy mm dd... (1 Reply)
I have this piece of code
printf '%s\n' $pth*.msf | tr ' ' '\n' | sort -t '-' -k7 -k6r \
| awk -F- '{c=($6$7!=p&&FNR!=1)?ORS:"";p=$6$7}{printf("%c%s\n",c,$0)}'
When I run it I get
/home/chrisd/tatsh/branches/terr0.50/darwin/n02-z30-dsr65-terr0.50-dc0.002-8x6drw-csq.msf... (8 Replies)
Hello,
i want to script on sh to check from a path if the directory exist and isn't empty.
I explain:
path is : /aaa/bbb/ccc/ccc_name/ddd/
Where the cccc_name is in a list, so i think it's $1
My command
find -name /aaa/bbb/ccc/$1/ddd/ didn't work because my $1 is the same and not... (5 Replies)
I am trying to create a script to list files by size. I was able to show a long listing before adding parameters (first comment) but nothing seems to work after trying to add them. If the first or only parameter is -r the output should be descending order by size, if the parameter is anything... (2 Replies)
Discussion started by: wbport
2 Replies
LEARN ABOUT OSX
flistxattr
LISTXATTR(2) BSD System Calls Manual LISTXATTR(2)NAME
listxattr, flistxattr -- list extended attribute names
SYNOPSIS
#include <sys/xattr.h>
ssize_t
listxattr(const char *path, char *namebuf, size_t size, int options);
ssize_t
flistxattr(int fd, char *namebuf, size_t size, int options);
DESCRIPTION
Extended attributes extend the basic attributes associated with files and directories in the file system. They are stored as name:data pairs
associated with file system objects (files, directories, symlinks, etc).
listxattr() retrieves a list of names of extended attributes associated with the given path in the file system.
namebuf is a data buffer of size bytes for the names of the extended attributes associated with path. The extended attribute names are sim-
ple NULL-terminated UTF-8 strings and are returned in arbitrary order. No extra padding is provided between names in the buffer. The list
will only include names of extended attributes to which the calling process has access. The function returns the size of the list of names.
options controls how the attribute list is generated:
XATTR_NOFOLLOW do not follow symbolic links. listxattr() normally lists attributes of the target of path if it is a symbolic link. With
this option, listxattr() will list attributes of the link itself.
XATTR_SHOWCOMPRESSION
listxattr() and flistxattr() will list HFS Plus Compression extended attribute(s) (if present) for the file referred to by
path or fd.
If namebuf is set to NULL, the function returns the size of the list of extended attribute names. This facility can be used to determine the
size of a buffer sufficiently large to hold the names of the attributes currently associated with path.
flistxattr() is identical to listxattr(), except that it returns the list of extended attribute names associated with the open file refer-
enced by file descriptor fd.
RETURN VALUES
On success, the size of the extended attribute name list is returned. If no accessible extended attributes are associated with the given
path or fd, the function returns zero. On failure, -1 is returned and the global variable errno is set as follows.
ERRORS
[ENOTSUP] The file system does not support extended attributes or has the feature disabled.
[ERANGE] namebuf (as indicated by size) is too small to hold the list of names.
[EPERM] path or fd refer to a file system object that does not support extended attributes. For example, resource forks don't
support extended attributes.
[ENOTDIR] A component of path 's prefix is not a directory.
[ENAMETOOLONG] name exceeds XATTR_MAXNAMELEN UTF-8 bytes, or a component of path exceeds NAME_MAX characters, or the entire path exceeds
PATH_MAX characters.
[EACCES] Search permission is denied for a component of path or permission is denied to read the list of attributes from this file.
[ELOOP] Too many symbolic links were encountered resolving path.
[EFAULT] path points to an invalid address.
[EIO] An I/O error occurred.
[EINVAL] options does not make sense.
SEE ALSO getxattr(2), removexattr(2), setxattr(2)HISTORY
listxattr() and flistxattr() first appeared in Mac OS X 10.4.
Mac OS X Oct 19, 2004 Mac OS X