Skip to main content
deleted 57 characters in body
Source Link
Rui F Ribeiro
  • 58k
  • 28
  • 156
  • 238

I have a large millions of records file which consists of "directories, file names , permission, group and owner, size, last accessed date, last modified date, last changed date ). I need to get the rows (files) that have last accessed date AND the last modified date less than or equal to 2012. Can you please help in providing awk, sed or any methods.

Example:

23 8 drwx------ 16 userid grpid 2048 2009-06-25 20:42 2011-03-03 17:27 2011-03-03 17:27 /path/dir
66738 8 drwx--S--- 3 userid grpid 1024 2010-03-05 11:49 2015-07-07 17:48 2010-03-05 11:49 /path/dir/dir2
90354 8 -rw-r----- 1 userid grpid 65536 2016-05-25 15:28 2008-05-22 12:00 2014-03-05 16:00 /path/dir/dir2/file1
89743 8 -rw-r----- 1 userid grpid 65536 2016-05-25 15:28 2008-05-22 12:00 2010-03-05 16:00 /path/dir/dir2/file2

I have a large millions of records file which consists of "directories, file names , permission, group and owner, size, last accessed date, last modified date, last changed date ). I need to get the rows (files) that have last accessed date AND the last modified date less than or equal to 2012. Can you please help in providing awk, sed or any methods.

Example:

23 8 drwx------ 16 userid grpid 2048 2009-06-25 20:42 2011-03-03 17:27 2011-03-03 17:27 /path/dir
66738 8 drwx--S--- 3 userid grpid 1024 2010-03-05 11:49 2015-07-07 17:48 2010-03-05 11:49 /path/dir/dir2
90354 8 -rw-r----- 1 userid grpid 65536 2016-05-25 15:28 2008-05-22 12:00 2014-03-05 16:00 /path/dir/dir2/file1
89743 8 -rw-r----- 1 userid grpid 65536 2016-05-25 15:28 2008-05-22 12:00 2010-03-05 16:00 /path/dir/dir2/file2

I have a large millions of records file which consists of "directories, file names , permission, group and owner, size, last accessed date, last modified date, last changed date ). I need to get the rows (files) that have last accessed date AND the last modified date less than or equal to 2012.

Example:

23 8 drwx------ 16 userid grpid 2048 2009-06-25 20:42 2011-03-03 17:27 2011-03-03 17:27 /path/dir
66738 8 drwx--S--- 3 userid grpid 1024 2010-03-05 11:49 2015-07-07 17:48 2010-03-05 11:49 /path/dir/dir2
90354 8 -rw-r----- 1 userid grpid 65536 2016-05-25 15:28 2008-05-22 12:00 2014-03-05 16:00 /path/dir/dir2/file1
89743 8 -rw-r----- 1 userid grpid 65536 2016-05-25 15:28 2008-05-22 12:00 2010-03-05 16:00 /path/dir/dir2/file2
formatting
Source Link
Flup
  • 8.3k
  • 2
  • 37
  • 51

I have a large millions of records file which consists of "directories, file names , permission, group and owner, size, last accessed date, last modified date, last changed date ). I need to get the rows (files) that have last accessed date AND the last modified date less than or equal to 2012. Can you please help in providing awk,sed sed or any methods.

Example:

23 8 drwx------ 16 userid grpid 2048 2009-06-25 20:42 2011-03-03 17:27 2011-03-03 17:27 /path/dir

66738 8 drwx--S--- 3 userid grpid 1024 2010-03-05 11:49 2015-07-07 17:48 2010-03-05 11:49 /path/dir/dir2

90354 8 -rw-r----- 1 userid grpid 65536 2016-05-25 15:28 2008-05-22 12:00 2014-03-05 16:00 /path/dir/dir2/file1

89743 8 -rw-r----- 1 userid grpid 65536 2016-05-25 15:28 2008-05-22 12:00 2010-03-05 16:00 /path/dir/dir2/file2

23 8 drwx------ 16 userid grpid 2048 2009-06-25 20:42 2011-03-03 17:27 2011-03-03 17:27 /path/dir
66738 8 drwx--S--- 3 userid grpid 1024 2010-03-05 11:49 2015-07-07 17:48 2010-03-05 11:49 /path/dir/dir2
90354 8 -rw-r----- 1 userid grpid 65536 2016-05-25 15:28 2008-05-22 12:00 2014-03-05 16:00 /path/dir/dir2/file1
89743 8 -rw-r----- 1 userid grpid 65536 2016-05-25 15:28 2008-05-22 12:00 2010-03-05 16:00 /path/dir/dir2/file2

I have a large millions of records file which consists of "directories, file names , permission, group and owner, size, last accessed date, last modified date, last changed date ). I need to get the rows (files) that have last accessed date AND the last modified date less than or equal to 2012. Can you please help in providing awk,sed or any methods.

Example:

23 8 drwx------ 16 userid grpid 2048 2009-06-25 20:42 2011-03-03 17:27 2011-03-03 17:27 /path/dir

66738 8 drwx--S--- 3 userid grpid 1024 2010-03-05 11:49 2015-07-07 17:48 2010-03-05 11:49 /path/dir/dir2

90354 8 -rw-r----- 1 userid grpid 65536 2016-05-25 15:28 2008-05-22 12:00 2014-03-05 16:00 /path/dir/dir2/file1

89743 8 -rw-r----- 1 userid grpid 65536 2016-05-25 15:28 2008-05-22 12:00 2010-03-05 16:00 /path/dir/dir2/file2

I have a large millions of records file which consists of "directories, file names , permission, group and owner, size, last accessed date, last modified date, last changed date ). I need to get the rows (files) that have last accessed date AND the last modified date less than or equal to 2012. Can you please help in providing awk, sed or any methods.

Example:

23 8 drwx------ 16 userid grpid 2048 2009-06-25 20:42 2011-03-03 17:27 2011-03-03 17:27 /path/dir
66738 8 drwx--S--- 3 userid grpid 1024 2010-03-05 11:49 2015-07-07 17:48 2010-03-05 11:49 /path/dir/dir2
90354 8 -rw-r----- 1 userid grpid 65536 2016-05-25 15:28 2008-05-22 12:00 2014-03-05 16:00 /path/dir/dir2/file1
89743 8 -rw-r----- 1 userid grpid 65536 2016-05-25 15:28 2008-05-22 12:00 2010-03-05 16:00 /path/dir/dir2/file2
Source Link

AND Operation on 2 columns (access and mofidy dates) in a file in linux

I have a large millions of records file which consists of "directories, file names , permission, group and owner, size, last accessed date, last modified date, last changed date ). I need to get the rows (files) that have last accessed date AND the last modified date less than or equal to 2012. Can you please help in providing awk,sed or any methods.

Example:

23 8 drwx------ 16 userid grpid 2048 2009-06-25 20:42 2011-03-03 17:27 2011-03-03 17:27 /path/dir

66738 8 drwx--S--- 3 userid grpid 1024 2010-03-05 11:49 2015-07-07 17:48 2010-03-05 11:49 /path/dir/dir2

90354 8 -rw-r----- 1 userid grpid 65536 2016-05-25 15:28 2008-05-22 12:00 2014-03-05 16:00 /path/dir/dir2/file1

89743 8 -rw-r----- 1 userid grpid 65536 2016-05-25 15:28 2008-05-22 12:00 2010-03-05 16:00 /path/dir/dir2/file2