Sponsored Content
Top Forums Shell Programming and Scripting How can i get last week files Post 302426953 by kshji on Thursday 3rd of June 2010 10:47:04 AM
Old 06-03-2010
This works fine in my environment: 1st day is monday and it's 1, sunday is 7.

Code:
day=$(date +%u) # return 4 in my env (2010-06-03 Thu)
((day1=day-1))
((day2=day+7))
find . -mtime +$day1 -a -mtime -$day2

 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to identify week-1 and week-2

Hello Friends I have three dirs 1. /home/main-bkup 2. /home/bkup-week1 3. /home/bkup-week2 Now we copy backups in 1 initially, then on 1st week we copy few content of 1 into 2 and then run some scripts on that. Then in 2nd week we keep 2 untouched and do the same thing in 3. So I... (1 Reply)
Discussion started by: csaha
1 Replies

2. Shell Programming and Scripting

Get Files from ftp which are uploaded recent week

Hi All, Here is a brief scenario for my requirement .. There is a directory in FTP Server, where would files be uploaded on weekly basic. I need to get those files which are uploaded during this week and not the files which are uploaded the previous week and download them to locale... (1 Reply)
Discussion started by: narramadan
1 Replies

3. Shell Programming and Scripting

Removing files older than one week in a directory

Hi, I need a shell script to remove the files older than a week in a directoy and if necessary to zip the files. (2 Replies)
Discussion started by: sudhakaryadav
2 Replies

4. UNIX for Dummies Questions & Answers

crontab every other week

I have two sets of tapes for each week days. Mon_Set_A ____________Tue_Set_B Tue_Set_A ____________ Tue_Set_B Wed_Set_A ___________ Wed_Set_B Thr_Set_A ____________ Thr_Set_B Fri_Set_A _____________ Fri_Set_B I have script that does cold backup of database and then back up to tape. ... (1 Reply)
Discussion started by: Paul.S
1 Replies

5. UNIX for Dummies Questions & Answers

Number of files accessed this week

I have looked around on the internet and still i am no wiser as to how to show the number of files in a directory that have been accessed this week and also that as a percentage. Any help would be much appreciated. (5 Replies)
Discussion started by: RAFC_99
5 Replies

6. UNIX for Advanced & Expert Users

How to pick only current week files?

Hi, My job will run every friday and it should pick only that week files. For Ex: this 24th May job will trigger and it should pick 20,21,22,23,24.and 19th sun and 18th sat we dont have files to pick. currently i am using the below code and it is working fine, but sometimes it is picking... (3 Replies)
Discussion started by: kiranparsha
3 Replies

7. Shell Programming and Scripting

Need help deleting files one week older

Hi, I need to delete *.bad files which are 1 week old. How can I achieve that. I tried doing through below script but it deletes all the files. find ./ -mtime +7 -exec rm *.bad {} \; The below one works but i want to delete only files with .bad extension find . -mtime +7 | xargs rm (2 Replies)
Discussion started by: Gangadhar Reddy
2 Replies

8. Linux

Get all the files from a FTP location with previous week's dates in the file names using Linux

I have a weird requirement where I have to get the files from a FTP(Lets say FTP1) location and place it on my current FTP(Lets say FTP2) location. The issue is, these are daily files (in a pattern Sales_YYYYMMDD_report.csv) and are placed every day on FTP1 and my process usually runs on Monday(eg.... (2 Replies)
Discussion started by: dhruuv369
2 Replies
Gtk2::Calendar(3)					User Contributed Perl Documentation					 Gtk2::Calendar(3)

NAME
Gtk2::Calendar HIERARCHY
Glib::Object +----Glib::InitiallyUnowned +----Gtk2::Object +----Gtk2::Widget +----Gtk2::Calendar INTERFACES
Glib::Object::_Unregistered::AtkImplementorIface Gtk2::Buildable METHODS
widget = Gtk2::Calendar->new $calendar->clear_marks (year, month, day) = $calendar->get_date $calendar->set_detail_func ($func, $data=undef) o $func (scalar) o $data (scalar) Since: gtk+ 2.14 integer = $calendar->get_detail_height_rows Since: gtk+ 2.14 $calendar->set_detail_height_rows ($rows) o $rows (integer) Since: gtk+ 2.14 integer = $calendar->get_detail_width_chars Since: gtk+ 2.14 $calendar->set_detail_width_chars ($chars) o $chars (integer) Since: gtk+ 2.14 $calendar->display_options ($flags) o $flags (Gtk2::CalendarDisplayOptions) The old name for "set_display_options". calendardisplayoptions = $calendar->get_display_options $calendar->set_display_options ($flags) o $flags (Gtk2::CalendarDisplayOptions) $calendar->freeze boolean = $calendar->mark_day ($day) o $day (integer) $widget->marked_date ($value) value = $widget->marked_date $widget->month ($value) value = $widget->month $widget->num_marked_dates ($value) value = $widget->num_marked_dates $calendar->select_day ($day) o $day (integer) boolean = $calendar->select_month ($month, $year) o $month (integer) o $year (integer) $widget->selected_day ($value) value = $widget->selected_day $calendar->thaw boolean = $calendar->unmark_day ($day) o $day (integer) $widget->year ($value) value = $widget->year PROPERTIES
'day' (integer : readable / writable / private) The selected day (as a number between 1 and 31, or 0 to unselect the currently selected day) 'detail-height-rows' (integer : readable / writable / private) Details height in rows 'detail-width-chars' (integer : readable / writable / private) Details width in characters 'month' (integer : readable / writable / private) The selected month (as a number between 0 and 11) 'no-month-change' (boolean : readable / writable / private) If TRUE, the selected month cannot be changed 'show-day-names' (boolean : readable / writable / private) If TRUE, day names are displayed 'show-details' (boolean : readable / writable / private) If TRUE, details are shown 'show-heading' (boolean : readable / writable / private) If TRUE, a heading is displayed 'show-week-numbers' (boolean : readable / writable / private) If TRUE, week numbers are displayed 'year' (integer : readable / writable / private) The selected year SIGNALS
month-changed (Gtk2::Calendar) day-selected (Gtk2::Calendar) day-selected-double-click (Gtk2::Calendar) prev-month (Gtk2::Calendar) next-month (Gtk2::Calendar) prev-year (Gtk2::Calendar) next-year (Gtk2::Calendar) ENUMS AND FLAGS
flags Gtk2::CalendarDisplayOptions o 'show-heading' / 'GTK_CALENDAR_SHOW_HEADING' o 'show-day-names' / 'GTK_CALENDAR_SHOW_DAY_NAMES' o 'no-month-change' / 'GTK_CALENDAR_NO_MONTH_CHANGE' o 'show-week-numbers' / 'GTK_CALENDAR_SHOW_WEEK_NUMBERS' o 'week-start-monday' / 'GTK_CALENDAR_WEEK_START_MONDAY' o 'show-details' / 'GTK_CALENDAR_SHOW_DETAILS' SEE ALSO
Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget COPYRIGHT
Copyright (C) 2003-2008 by the gtk2-perl team. This software is licensed under the LGPL. See Gtk2 for a full notice. perl v5.12.1 2010-07-05 Gtk2::Calendar(3)
All times are GMT -4. The time now is 03:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy