Regex command to remove deleted emails

Ask a Question related to PERL Beginners, Design and Development.

  1. #1

    Default Regex command to remove deleted emails

    I'm trying to use the following to remove deleted emails (deleted emails
    have file names that end in ",ST"):
    rm -f $(find /home/vmail Maildir | grep ,ST)

    This works well for the most part, however some files don't get deleted,
    I suspect because of their length or characters in the pathname. For
    example, following was not deleted:
    /home/vmail/jam/Maildir/.Personal items.Saved
    mail/cur/1060014026.M14682P23099V0000000000000904I00105790_ 15.mail.lp.com,
    S=33883:2,ST

    Anyone know of a way to include a delimiter or other function to force
    the removal of files such as one above?

    John Schmerold Guest

  2. Similar Questions and Discussions

    1. remove command history
      If I press button "up" I can see all comand which I write before. How I can clear this command history under suse linux 8.0?
    2. rm $( locate Maildir | grep ,ST ) will not work to remove deleted emails
      I have a number of Outlook XP users that don't purge their deleted emails, so I want to remove them myselve with following regex command: rm $(...
    3. [SESSION] Session variable deleted prior to command?
      Hi all, I'm developing a database system on my local computer (OS/version details at bottom) with a simple user authentication using sessions. On...
    4. How to destroy (remove from memory) created with new command members
      I create (for example) 50 bitmap members with new command are they removed from memory or do i need do do it myself ??? if YES then - how to...
    5. how to remove a programe from the add/remove list manually
      i am using winXP home, i just remove a programe from the start menu(start>>all programes>>name of the programe>>uninstall),but the programe name is...
  3. #2

    Default RE: Regex command to remove deleted emails

    I haven't had a chance to test this, but how about:

    ####################################

    use strict;
    use warnings;
    use File::Find;
    find(sub{unlink if /,ST$/},"/my/directory/");

    ####################################

    -----Original Message-----
    From: news on behalf of John Schmerold
    Sent: Wed 1/28/2004 9:44 PM
    To: [email]beginners@perl.org[/email]
    Cc:
    Subject: Regex command to remove deleted emails



    I'm trying to use the following to remove deleted emails (deleted emails
    have file names that end in ",ST"):


    <snip>

    Tim Johnson Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139