Perhaps the number one advanced find question is:
How to stop find from descending into subdirectories?
find command
Performing a non-recursive find in Unix
Use -prune with find command on AIX
Searching for files over 30 days old in current directory
disk space used for files with in a... (0 Replies)
Hi All,
Can i use find command to know given date files? If yes, then please let me know the syntax for the same.
Thanks in advance for your postive responses
Regards,
Bachegowda (3 Replies)
Haven't worked in bash for ages. did a good bit of shell scripting in regular sh, but have forgotten most of it.
I have several thousand php files that now include the following line at the end of the file. There is no LF or CR/LF before it begins, it is just concatenated to the final line of... (3 Replies)
How to I put my find command string into a script. It is currently to long to be entered manually at command line.
for FNAME in `find /unixsxxx/interface/x.x/xxxxxx -type f \( -name '*.KSH' -o -name '*.sh' -o -name '*.sql' -o -name '*.ksh' \) -exec grep -il xxx.xxx.xxx.xxx {} \;`; do C=`grep -c... (5 Replies)
help pls...
i would like to change this
CURVE2 565489 789458 1258649
random data here...
CURVE2 565489 568795 6548921
random data here...
CURVE2 565489 123598 6446259
random data here...
CURVE2 565489 672956 2489657
into this
CURVE2 565489 586423 1258649
random data here...... (2 Replies)
Hi all,
I am trying to execute the following command:
find 'path' -ls -exec cksum {} \;
As you can see this simply finds files from a given path and runs cksum on them.
My problem is this, if i have a FIFO in a directory the find tries to execute cksum on it and gets stuck.
From the man page i... (9 Replies)
I'm looking to write a script that will do a find of directories and delete them if they are older than x days but keep the last x # of folders even if they are older than x days.
The usage is for a deployment location, so we want to keep the location clean but retain maybe the last 2 builds that... (5 Replies)
It saves me lot of typing and space/lines when I do not use full 'if' keyword and construct, instead use ..
&& <statement> || <statement>
that perfectly replaces..
if ; then
<statement>
else
<statement>
fi
Can I use following syntax when I want to add multiple statements under 'if'... (4 Replies)
test.txt is the dynamic file but some of combination are fix
like below are the lines
;wonder_off =
;wonder_off = disabled
wonder_off =
wonder_off = disabled
the test.txt can content them in any order
#cat test.xt
;wonder_off =
;wonder_off = disabled
wonder_off =
wonder_off =... (5 Replies)
I have the following script working currently. The only thing I want to add is to somehow tell the script to find the files using the find and maxdepth variables and then move the files to a corresponding file structure.
example:
file test.txt exists in the /data/user1/upload directory
The... (4 Replies)
Discussion started by: jwt66
4 Replies
LEARN ABOUT OPENSOLARIS
fstyp_mod_init
fstyp_mod_init(3FSTYP) File System Type Identification Library Functions fstyp_mod_init(3FSTYP)NAME
fstyp_mod_init, fstyp_mod_fini, fstyp_mod_ident, fstyp_mod_get_attr, fstyp_mod_dump - libfstyp module interface
SYNOPSIS
cc [ flag... ] file... -lfstyp-lnvpair [ library... ]
#include <libnvpair.h>
#include <libfstyp.h>
int fstyp_mod_init(int fd, off64_t **offset, fstyp_mod_handle_t *handle);
void fstyp_mod_fini(fstyp_mod_handle_t handle);
int fstyp_mod_ident(fstyp_mod_handle_t handle);
int fstyp_mod_get_attr(fstyp_mod_handle_t handle, nvlist_t **attr);
int fstyp_mod_dump(fstyp_mod_handle_t handle, FILE *fout, FILE *ferr);
PARAMETERS
fd Open file descriptor of a block or a raw device that contains the file system to be identified.
offset Offset from the beginning of the device where the file system is located.
handle Opaque handle that the module returns in fstyp_mod_init() and is used with other module functions.
fout Output stream.
ferr Error stream.
DESCRIPTION
A libfstyp module implements heuristics required to identify a file system type. The modules are shared objects loaded by libfstyp. The
libfstyp modules are located in /usr/lib/fs subdirectories. A subdirectory name defines the name of the file system.
Each module exports the fstyp_mod_init(), fstyp_mod_fini(), fstyp_mod_ident(), and fstyp_mod_get_attr() functions. All of these functions
map directly to the respective libfstyp interfaces.
The fstyp_mod_dump() function is optional. It can be used to output unformatted information about the file system. This function is used by
the fstyp(1M) command when the -v option is specified. The fstyp_mod_dump() function is not recommended and should be used only in legacy
modules.
FILES
/usr/lib/fs/
Default module directory.
/usr/lib/fs/fstype/fstyp.so.1
Default path to a libfstyp module for an fstype file system.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO fstyp(1M), fstyp_strerror(3FSTYP), libfstyp(3LIB), attributes(5)SunOS 5.11 29 Jun 2006 fstyp_mod_init(3FSTYP)