Results 1 to 4 of 4
-
06-26-2012, 01:29 PM #1Newcomer
- Join Date
- Jun 2012
- Posts
- 10
- Thanks
- 0
- Thanked 0 Times in 0 Posts
win2008R2 using gnu grep/awk to find only inactive files
Ok, running tsm on 2008R2, and I have the gnu awk and grep installed...I want to only capture inactive files inside of the backup...I can get this to work on linux, but because windows interprets " ' ` differently, i can't get it to print out right...Here's what I have:
so basically here's the command
F:\Program Files\Tivoli\TSM\baclient>dsmc q backup f:\* -subdir=yes -ina | grep "0 B" | awk "$1<=0"
0 B 06/11/2012 13:55:09 STANDARD A \\virttsm\f$\db001
0 B 06/11/2012 16:08:16 STANDARD A \\virttsm\f$\FILES
0 B 06/11/2012 13:03:39 STANDARD I \\virttsm\f$\FILES
0 B 06/11/2012 13:55:09 STANDARD A \\virttsm\f$\db001\SERVER1
0 B 06/11/2012 13:55:09 DEFAULT A \\virttsm\f$\db001\SERVER1\SQLCRT.FLG
0 B 06/11/2012 16:08:16 DEFAULT A \\virttsm\f$\FILES\dsmc
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy (10)
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy (11)
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy (12)
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy (13)
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy (14)
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy (15)
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy (16)
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy (17)
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy (1
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy (19)
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy (2)
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy (20)
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy (21)
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy (3)
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy (4)
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy (5)
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy (6)
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy (7)
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy (
0 B 06/11/2012 13:03:39 DEFAULT A \\virttsm\f$\FILES\file_1888 - Copy (9)
then inside of unix i would just print where field 6 == I, any ideas inside of windows so that I only capture the I column
thxs in adv
-
06-26-2012, 02:25 PM #2Moderator
- Join Date
- Aug 2005
- Location
- Somewhere in the US
- Posts
- 5,357
- Thanks
- 2
- Thanked 148 Times in 145 Posts
dsmc q backup f:\* -subdir=yes -ina | grep "0 B" | awk '{print $7}'
Ed
-
06-26-2012, 02:35 PM #3Newcomer
- Join Date
- Jun 2012
- Posts
- 10
- Thanks
- 0
- Thanked 0 Times in 0 Posts
I forgot to mention that I need the file and it's state...IE, i need to know what files are 0bytes, and in the inactive state..
Here's the output I need:
0 B 06/11/2012 13:03:39 STANDARD I \\virttsm\f$\FILES1
0 B 06/11/2012 13:03:39 STANDARD I \\virttsm\f$\FILES2
0 B 06/11/2012 13:03:39 STANDARD I \\virttsm\f$\FILES3
0 B 06/11/2012 13:03:39 STANDARD I \\virttsm\f$\FILES4
etc etc
Here's the command to get the 0 byte files, but I need a way to key off of the Inactive column...
dsmc q backup f:\* -subdir=yes -ina | grep "0 B" | awk "$1<=0"Last edited by nextreme; 06-26-2012 at 03:11 PM. Reason: add more info
-
06-26-2012, 03:26 PM #4Newcomer
- Join Date
- Jun 2012
- Posts
- 10
- Thanks
- 0
- Thanked 0 Times in 0 Posts
Here ya all go, remember this is for windows...
Here it is, found on another forum, then modified...
dsmc q backup f:\* -subdir=yes -ina | grep "0 B" | awk "$1<=0" | awk "{ if ($6 ~ /I/) print $0}"
0 B 06/11/2012 13:03:39 STANDARD I \\virttsm\f$\FILES
0 B 06/11/2012 13:03:39 STANDARD I \\virttsm\f$\FILES1
0 B 06/11/2012 13:03:39 STANDARD I \\virttsm\f$\FILES2
0 B 06/11/2012 13:03:39 STANDARD I \\virttsm\f$\FILES3
Similar Threads
-
unable to find inactive files
By unixandtsm in forum Backup / Archive DiscussionReplies: 1Last Post: 03-02-2012, 05:31 PM -
Size of inactive files!
By Mirdas_M in forum TSM Documentation,Tips and TricksReplies: 1Last Post: 07-09-2008, 07:47 AM -
Query inactive files - delete specific files
By xefil in forum Backup / Archive DiscussionReplies: 5Last Post: 11-27-2006, 03:30 PM -
how to find when the deleted files become inactive in TSM
By hping in forum Backup / Archive DiscussionReplies: 1Last Post: 02-17-2005, 04:18 AM -
When are inactive files deleted?
By kimon in forum TSM ServerReplies: 1Last Post: 11-06-2002, 03:20 PM


Reply With Quote