I have a directory which contains files with different kinds of extensions .everyday a file with .log gets added to it .i want to extract the file with .log extension which is created with todays date .
thanks in advance (2 Replies)
I have a directory MYDIR
In which i have several directories 1,2,3,4....
Now, In each of these directories i have several files a.dat, b.dat, c.dat, d.dat.....
MYDIR
----1
---------a.dat
---------b.dat
---------c.dat
---------d.dat
----2
---------a.dat
---------b.dat
---------c.dat... (2 Replies)
Hi, I have a directory PRIVATE in which I have several directories and each of these have several files. Therefore, I need to find those files by size and date to back up those files in another directory.
I don't know how to implement this shell script using ''find''.
appreciate any... (1 Reply)
hi guys,
Suppose you have 100 files in a folder and you want to replace all occurances of a word say "ABCD" in those files with "DCBA", how would you do
it ???
jatin (13 Replies)
Hi Experts,
I am trying to write a shell script that should
1. Find files with name (ab030.txt,Ab030.TXT,AB030.TXT,ab030.TXT,AB030.txt)
2. If any of the above found, rename it to AB030.TXT
Thanks. (4 Replies)
Hi. I have a problem that i can't seem to resolve. I need to create a script that list all the files, that are found recursively, with the same name.
For example if a file exists in more than one directory with the same name it list all the files that he founds with all the info. Could someone... (5 Replies)
Hello all,
I am in need of assistance in creating a script that will remove a specified block of text from multiple .htaccess files. (roughly 1000 files)
I am attempting to help with a project to clean up a linux server that has a series of unwanted url rewrites in place, as well as some... (4 Replies)
Hi friends.. I have many dirs in my working directory. Every dir have thousands of files (.jsp, .java, .xml..., etc). So I am working with an script to find every file recursively within those directories and subdirectories ending with .jsp or .java which contains inside of it, the the pattern... (3 Replies)
Hi,
I have the shell script requirement mentioned below :
List all java and c files or all files in directory and sub directories' in folder structure in current dir.
then search for pattren1 in all files globally and replace with other string .
And also check the date... (3 Replies)
Hi all,
i am new to this forum, unix and shell scripting.
I would really appreciate if you all can help me here..
I have files coming in the below format
'filename20513'13May06:03:45
filename are characters..
like 'ABDDUT20513'13May06:03:45
i need it to be renamed as... (17 Replies)
Discussion started by: khman
17 Replies
LEARN ABOUT CENTOS
zip_stat
ZIP_STAT(3) Library Functions Manual ZIP_STAT(3)NAME
zip_stat , - .Nm zip_stat_index get information about file
LIBRARY
libzip (-lzip)
SYNOPSIS
#include <zip.h>
int zip_stat(struct zip *archive, const char *fname, int flags, struct zip_stat *sb);
int zip_stat_index(struct zip *archive, int index, int flags, struct zip_stat *sb);
DESCRIPTION
The zip_stat function obtains information about the file named fname in archive. The flags argument specifies how the name lookup should
be done. Its values are described in zip_name_locate(3). Also, ZIP_FL_UNCHANGED may be or'ed to it to request information about the orig-
inal file in the archive, ignoring any changes made.
The zip_stat_index function obtains information about the file at position index.
The sb argument is a pointer to a
struct zip_stat (shown below), into which information about the file is placed. struct zip_stat {
zip_uint64_t valid; /* which fields have valid values */
const char *name; /* name of the file */
zip_uint64_t index; /* index within archive */
zip_uint64_t size; /* size of file (uncompressed) */
zip_uint64_t comp_size; /* size of file (compressed) */
time_t mtime; /* modification time */
zip_uint32_t crc; /* crc of file data */
zip_uint16_t comp_method; /* compression method used */
zip_uint16_t encryption_method; /* encryption method used */
zip_uint32_t flags; /* reserved for future use */ }; The structure pointed to by sb must be allocated before calling
zip_stat or zip_stat_index.
The valid field of the structure specifies which other fields are valid. Check if the flag defined by the following defines are in valid
before accessing the fields:
ZIP_STAT_NAME name
ZIP_STAT_INDEX index
ZIP_STAT_SIZE size
ZIP_STAT_COMP_SIZE comp_size
ZIP_STAT_MTIME mtime
ZIP_STAT_CRC crc
ZIP_STAT_COMP_METHOD comp_method
ZIP_STAT_ENCRYPTION_METHOD encryption_method
ZIP_STAT_FLAGS flags
RETURN VALUES
Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in archive is set to indicate the error.
ERRORS
The function zip_stat can fail for any of the errors specified for the routine zip_name_locate(3).
The function zip_stat_index fails and sets the error information to ZIP_ER_INVAL if index is invalid. If ZIP_FL_UNCHANGED is not set and
no information can be obtained from the source callback, the error information is set to ZIP_ER_CHANGED.
SEE ALSO libzip(3), zip_get_num_entries(3), zip_name_locate(3), zip_stat_init(3)AUTHORS
Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>
NiH February 14, 2011 ZIP_STAT(3)