05-12-2015
First off, add echo before rm. Never ever ever run a batch deletion script you haven't tested.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Help me understand the right output.
We have two machines.
The first one is
HP-UX machine1 B.11.00 U 9000/800 694339343 unlimited-user license
The second one is
AIX machine2 2 5 00067B2F4C00
with AIX version 5.2.0.0
Here is the command that I use on both systems on different... (9 Replies)
Discussion started by: jerardfjay
9 Replies
2. Programming
I have the following program:
int main(int argc, char** argv){
unsigned long int mean=0;
for(int i=1;i<10;i++){
mean+=poisson(12);
cout<<mean<<endl;
}
cout<<"Sum of poisson: "<< mean;
return 0;
}
when I run it, I get the... (4 Replies)
Discussion started by: santiagorf
4 Replies
3. Ubuntu
It is so till login screen. I mean that when I boot my computer, Ubuntu shows a splash screen with mouse instead of Ubuntu logo and in the login screen it shows XUbuntu login screen... It began when I upgraded to previous kernel, I suppose, but I'm not sure... I can't say that it annoys me very... (6 Replies)
Discussion started by: Sapfeer
6 Replies
4. AIX
Hello together,
i have a strange memory behavior on a AIX 7.1 System, which i cannot explain.
The Filesystem-Cache will not be grow up and drops often after few minutes. I know if a file was deleted, that the same segment in the FS-Cache will also be cleared. But i am not sure if this is the... (8 Replies)
Discussion started by: -=XrAy=-
8 Replies
5. UNIX for Advanced & Expert Users
Centos 5.8
Lets say I have 2 nfs shares mounted to /folder1 and /folder2.
If I do a find / -name *something*
Will it also search the 2 nfs shares ?
If so is there a way to avoid this?
Thanks (2 Replies)
Discussion started by: whegra
2 Replies
6. AIX
I am trying to create an archive using tar. I am specifying a list of directories using the -L option. For testing purposes I created a simple directory structure:
/backup/test
/backup/test/test1
/backup/test/test2
The file specified by the -L option, named files.txt, contains:... (8 Replies)
Discussion started by: judykstra
8 Replies
7. Shell Programming and Scripting
Hi All,
I am facing a strange problem while grepping for a process. Here is the small script that i have written.
It will look for any process running with the parameter passed to the script.
If no process is running it should print appropriate message.
$ cat t.ksh
#!/bin/ksh
set -x
... (9 Replies)
Discussion started by: veeresh_15
9 Replies
8. Shell Programming and Scripting
Hello All,
I have a strange issue. I've created a shell script which connects to RMAN (Oracle Recovery Manager) and executes full DB backup. I then executed this script with nohup and in the background:
$ nohup my_script.sh > logfile.log 2>&1 &The issue is that when I tried to take a look into... (6 Replies)
Discussion started by: JackK
6 Replies
9. UNIX for Advanced & Expert Users
I am getting some strange behaviour from the kill command. When I run the which command it says it points to /usr/bin/kill. When I look at my PATH I have /usr/bin in it. So why does running kill or /usr/bin/kill produce different outputs?
ghost ~
$ which kill
/usr/bin/kill
ghost ~
$ kill... (5 Replies)
Discussion started by: cokedude
5 Replies
LEARN ABOUT PHP
imap_delete
IMAP_DELETE(3) 1 IMAP_DELETE(3)
imap_delete - Mark a message for deletion from current mailbox
SYNOPSIS
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)