

For example: C:\>Get-MailboxFolderStatistics alan.reid -FolderScope Inbox | Select Name,FolderSize,ItemsinFolder Similarly you may wish to only look at specific folders and subfolders, which you can achieve using the -FolderScope parameter. You may wish to return just a few of the more interesting bits of information instead, for example: C:\>Get-MailboxFolderStatistics alan.reid | Select Name,FolderSize,ItemsinFolderĬonversation Action Settings 0 B (0 bytes) 0 If you ran that command against a mailbox in your organization you will see a lot of information returned. This cmdlet can be used to report on some or all of the individual folders within a mailbox, returning such information as their size and item count.įor example: Get-MailboxFolderStatistics alan.reid The solution to Rebecca’s scenario is in the Get-MailboxFolderStatistics cmdlet.

Note: To determine the size of a single, known directory, from a PASE, QSH, or SSH command prompt, execute: du -sh /path/to/directoryĪssistance creating customized SQL statements can be obtained via IBM i Customized Services.I am trying to find a command that will return the user and total item count for the inbox only. They are available under the pull-down menu " Edit -> Insert from Examples." and then search on "IFS" Note: The current version of IBM i Access Client Solutions, "Run SQL Scripts" function includes several IFS-related example scripts. ***Use with caution!*** The above is functionally equivalent to the POSIX "rm -rf /rick/*" command. In the example above, disk cleanup could start with the user directory "/rick" and proceed down the list.īelow is an example of deleting everything within directory '/rick' (including all sub-directories and files) : => RMDIR DIR('/rick/*') SUBTREE(*ALL)

However, a CAST will be needed to display the directory names: SELECT sum(O.QEZALCSIZE), CAST(D.QEZDIRNAM1 AS CHAR(256)), D.QEZDIRIDXįROM QUSRSYS.MyRootDirD d join QUSRSYS.MyRootDirO o on d.qezdiridx = o.qezdiridx Note: If ACS "Run SQL Scripts" is not available, STRSQL NAMING(*SQL) can be used on the IBM i. Sample output when the above SQL statements were run using Access Client Solutions "Run SQL Scripts" functionality : Any NFS mount points should be added to the omit list as well. If a particular user directory (For example, /tmp) is suspected of allocating a lot of space, time can be saved by running the RTVDIRINF on that specific directory instead ( (RTVDIRINF DIR('/tmp')).Ģ.

The above command retrieves directory information regarding the root and all nested sub-directories and stores it in the database files MYROOTDIRO and MYROOTDIRD in library QUSRSYS.ġ. SBMJOB CMD(RTVDIRINF DIR('/') INFFILEPFX(MYROOTDIR) SUBTREE(*ALL) OMIT('/QNTC' '/QFilesvr.400' '/QDLS' '/QSYS.lib' '/QOPT')) JOB(RTVDIRINF) The operation may take some time, depending on many system configuration and usage variables: This will show specifically which user directories have allocated the most space.įirst, a job is submitted which executes RTVDIRINF on all user directories on the system. If the "User directories" value is high, information regarding the storage allocated to the user directories should be retrieved. Review the resulting QPEZDISK spooled file output.
