Hi,
I have a list of directories which contain old files that are to be deleted.
I put the list of all directories in a txt file and it is being read by a script
Iam searching for the files older than 60 days using mtime and then deleting it
But all the files are getting deleted... (3 Replies)
Can someone suggest on this script :
let's say the logs files are available for Jan 07, Dec 06, Nov 06, Oct 06
the script should identify the latest months logs, i.e Jan 07
it should then delete anything older than 2 months, which will be logs for Nov 06 & Oct 06. (40 Replies)
I have created a address book file. Insertion of Record (using >> symbol)and searching of record (using grep command) into the address book is also working correctly. Now I want to delete a record into a file. Any body can help me in this case without using sed and awk18 18.
Thanks and best... (24 Replies)
Discussion started by: murtaza
24 Replies
5. Forum Support Area for Unregistered Users & Account Problems
How to delete a particular character in a file and then removing the spaces created by that removal.I am working with a text file containing nucleotide sequences.
I have tried sed command but it replaces N with spaces.
example:I want to delete all the N without creating a space after its ... (1 Reply)
Hi,
I have file with footer (5records) at end of the file. I want to delete the footer as well as the empty records between the main records and footer record.(The gap between main records and Footer records is dynamic)
Example:
MainRecord1 "115494",","FAELD","CT","... (12 Replies)
Discussion started by: vsairam
12 Replies
8. Post Here to Contact Site Administrators and Moderators
Hi Everyone,
There are certain files under a folder 'ABC' and the entries for these files are there in another file(fname) under a different folder 'XYZ'. I want to compare the folder contents(ABC) with
the file(fname) contents and delete the mismatching / non-existing ones from the file,... (4 Replies)
Hi,
I have a file with four types of lines:
@HWUSI-EAS656_0022:8:1:175:376#0/1
CTCGACACGCTGGTGGAGATCCTCGGCCTGACCGAGGACGACCGGGCCATCTTCGAGCAGCGC
+
BBBBBBBA?AABB;<=B9<===AA1AA==>99===.9?:9A4A956%%%%%%%%%%%%%%%%%
I want to remove the first 6 characters of every second line. This means in... (10 Replies)
Discussion started by: s052866
10 Replies
LEARN ABOUT PHP
imap_delete
IMAP_DELETE(3) 1 IMAP_DELETE(3)imap_delete - Mark a message for deletion from current mailboxSYNOPSIS
bool imap_delete (resource $imap_stream, int $msg_number, [int $options])
DESCRIPTION
Marks messages listed in $msg_number for deletion. Messages marked for deletion will stay in the mailbox until either imap_expunge(3) is
called or imap_close(3) is called with the optional parameter CL_EXPUNGE.
PARAMETERS
o $
imap_stream -An IMAP stream returned by imap_open(3).
o $msg_number
- The message number
o $options
- You can set the FT_UID which tells the function to treat the $msg_number argument as an UID.
RETURN VALUES
Returns TRUE.
EXAMPLES
Example #1
imap_delete(3) example
<?php
$mbox = imap_open("{imap.example.org}INBOX", "username", "password")
or die("Can't connect: " . imap_last_error());
$check = imap_mailboxmsginfo($mbox);
echo "Messages before delete: " . $check->Nmsgs . "<br />
";
imap_delete($mbox, 1);
$check = imap_mailboxmsginfo($mbox);
echo "Messages after delete: " . $check->Nmsgs . "<br />
";
imap_expunge($mbox);
$check = imap_mailboxmsginfo($mbox);
echo "Messages after expunge: " . $check->Nmsgs . "<br />
";
imap_close($mbox);
?>
NOTES
Note
IMAP mailboxes may not have their message flags saved between connections, so imap_expunge(3) should be called during the same con-
nection in order to guarantee that messages marked for deletion will actually be purged.
SEE ALSO imap_undelete(3), imap_expunge(3), imap_close(3).
PHP Documentation Group IMAP_DELETE(3)