i want to delete files that are one day old
condition is files should be of current month only ie if iam running script on 1 march it should not delete files of 28 feb(29 if leap year :-)}
any modifications to
find $DIR -type f -atime +1 -exec rm -f{}\; (4 Replies)
Hai all
i want to grep the particular pattern and move the mathing records to torget file and delete the matching recodrs from source file.
patterns are position based, like
13413432,aaaaaaa,dsfdddddd,34234324,22224555
13413432,aaaaaaa,dsfdddddd,12234324,11222455
i want to move the... (1 Reply)
I have a big file with "|" delimiter. I want to delete all the records that have 'abc' in the 2nd field. How can i do that? I am not abe to open it in VI that is why i need to do it from outside. Please suggest (6 Replies)
Dear All,
I am not able to remove the files in my AIX 5.3 server.
My files List
/iims-home/data/uat1/batch/staging
-rw-r--r-- 1 iims iims 5743 Jun 12 09:04 ErrorReport2008-05-20 09-04-18.doc
-rw-r--r-- 1 iims iims 191213683 Jun 12 09:05... (1 Reply)
Hi,
I have a file whose size is not zero but it has no records and another which has records. I want to delete all the files that have no records in it (even if size > 0). How do I do it?
I have tried the below option
#!/bin/ksh
temp1 = $(wc -l < INVX102C.sf)
if ; then
echo "Data... (3 Replies)
I have a directory /opt/targets which generates more than 1000 files per day and I want to delete all the files which are more than 1 day old...ie 24hrs+
Please help.. (3 Replies)
Hi Experts ,
At a particular dir , How to delete subirectories that are more than 1 day old AND have NO files in them.
PS : -empty option is not working at my Sun OS version.
Thanks,
A (6 Replies)
Hi,
Can any one help me...
the records are not deleting when I run the below script.
But if I issue the same delete command manually, the records are getting deleted.
script:
#!/bin/ksh
USAGE_STRING="USAGE $0 "
if
then
echo "SORRY you need to be user 'mqm'. Only 'mqm' has... (5 Replies)
My objective is to get the non matching records of previous day with current day.
eg, file1 contains
1 a
2 b
and file2 contains:
2 b
3 c
then expected output is
3 c¨
another example
file 1 contains:
1 a
2 b
file 2 contains
1 c
2 b (8 Replies)
friends
how I can delete files from a directory for the current date? (2 Replies)
Discussion started by: tricampeon81
2 Replies
LEARN ABOUT PHP
ftp_rawlist
FTP_RAWLIST(3) 1 FTP_RAWLIST(3)ftp_rawlist - Returns a detailed list of files in the given directorySYNOPSIS
mixed ftp_rawlist (resource $ftp_stream, string $directory, [bool $recursive = false])
DESCRIPTION ftp_rawlist(3) executes the FTP LIST command, and returns the result as an array.
PARAMETERS
o $ftp_stream
- The link identifier of the FTP connection.
o $directory
- The directory path. May include arguments for the LIST command.
o $recursive
- If set to TRUE, the issued command will be LIST -R.
RETURN VALUES
Returns an array where each element corresponds to one line of text. Returns FALSE when passed $directory is invalid.
The output is not parsed in any way. The system type identifier returned by ftp_systype(3) can be used to determine how the results should
be interpreted.
EXAMPLES
Example #1
ftp_rawlist(3) example
<?php
// set up basic connection
$conn_id = ftp_connect($ftp_server);
// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
// get the file list for /
$buff = ftp_rawlist($conn_id, '/');
// close the connection
ftp_close($conn_id);
// output the buffer
var_dump($buff);
?>
The above example will output something similar to:
array(3) {
[0]=>
string(65) "drwxr-x--- 3 vincent vincent 4096 Jul 12 12:16 public_ftp"
[1]=>
string(66) "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 public_html"
[2]=>
string(73) "lrwxrwxrwx 1 vincent vincent 11 Jul 12 12:16 www -> public_html"
}
SEE ALSO ftp_nlist(3).
PHP Documentation Group FTP_RAWLIST(3)