Sponsored Content
Top Forums Shell Programming and Scripting Concatenating Files In A Year/Month/Day File Structure Post 302352342 by clx on Friday 11th of September 2009 05:03:04 AM
Old 09-11-2009
I guess you are talking about directory structure not file structure.
if yes, try:

Code:
mkdir -p $(date +"%Y/%m/%d")/products

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

delete files one day old in current month only

i want to delete files that are one day old condition is files should be of current month only ie if iam running script on 1 march it should not delete files of 28 feb(29 if leap year :-)} any modifications to find $DIR -type f -atime +1 -exec rm -f{}\; (4 Replies)
Discussion started by: maverick
4 Replies

2. Shell Programming and Scripting

Day of month and year to mmddyyyy

I have a date that looks like this: 2008/100:18:40:47.040 I need it to look like this: 2008 04 09 18 40 47 040 I have looked at datecalc and it doesn't seem like it takes the day of year for this year (or whatever year is input) and converts it into month and day. It also has to account... (2 Replies)
Discussion started by: ajgwin
2 Replies

3. Shell Programming and Scripting

Get yesterday's date in year-month-day format?

Dear All, Actually, i'm doing some reporting job and i need to pass yesterday's date in Year-Month-Day format(e.g. 2009-06-10) to another program for generating 2009-06-10 report. to get today's date, it's easy to just date '+%Y%m%d' , but no idea how can i get this kind of format for... (2 Replies)
Discussion started by: tiger2000
2 Replies

4. AIX

Convert unix timestamp to year month day format ?

Hello, How do I convert unix timestamp value to 'normal' date format - to get year month and day values ? Looks like it's easy to do using GNU date (linux systems). But how do I do tthis on AIX ? I don't want to write C program, any ways to do that using unix shells ? thanks (1 Reply)
Discussion started by: vilius
1 Replies

5. Shell Programming and Scripting

want to get last year and month from the file

Hi I have files like abc_cd_20110302_123423 abc_cd_ef_20110301_123423 abc_cd_ef_20110403_123423 abc_ef_20110401_123423 I want to extract the the year and month associated with each file. I tried logfileyearmonth=`echo $logfile | awk -F_'{print $NF}'` Any other way can I... (6 Replies)
Discussion started by: dgmm
6 Replies

6. Shell Programming and Scripting

Julian day to dates in YEAR-MONTH-DAY

hello, I have many files called day001, day002, day003 and I want to rename them by day20070101, day20070102, etc. I need to do it for several years and leap years as well. What is the best way to do it ? Thank you. (1 Reply)
Discussion started by: Ggg
1 Replies

7. Shell Programming and Scripting

How to list files that are not first two files date & last file date for every month-year?

Hi All, I need to find all files other than first two files dates & last file date for month and month/year wise list. lets say there are following files in directory Mar 19 2012 c.txt Mar 19 2012 cc.txt Mar 21 2012 d.txt Mar 22 2012 f.txt Mar 24 2012 h.txt Mar 25 2012 w.txt Feb 12... (2 Replies)
Discussion started by: Makarand Dodmis
2 Replies

8. Shell Programming and Scripting

How to find all files for same month and year?

Hi All, I find all files for same month and year lets say there are following files in directory -rwxr-xr-x 1 user userg 1596 Mar 19 2012 c.txt -rwxr-xr-x 1 user userg 1596 Mar 21 2012 d.txt -rwxr-xr-x 1 user userg 1596 Mar 22 2012 f.txt -rwxr-xr-x 1... (8 Replies)
Discussion started by: Makarand Dodmis
8 Replies

9. Shell Programming and Scripting

How to find all files other than first two dates & last date per month and year?

how to find all files other than first two dates & last date per month and year Hi All, lets say there are following files in directory -rwxr-xr-x 1 user userg 1596 Mar 19 2012 a.txt -rwxr-xr-x 1 user userg 1596 Mar 19 2012 b.txt -rwxr-xr-x 1 user userg ... (6 Replies)
Discussion started by: Makarand Dodmis
6 Replies

10. Shell Programming and Scripting

How to find all files other than last two dates per month and year?

Hi All, lets say there are following files in directory -rwxr-xr-x 1 user userg 1596 Mar 19 2012 a.txt -rwxr-xr-x 1 user userg 1596 Mar 19 2012 b.txt -rwxr-xr-x 1 user userg 1596 Mar 22 2012 c.txt -rwxr-xr-x 1 user userg 1596 Mar 24 2012 d.txt... (16 Replies)
Discussion started by: Makarand Dodmis
16 Replies
XCALEV(1)						      General Commands Manual							 XCALEV(1)

NAME
xcalev - load xcal calendar files with regular dates SYNTAX
xcalev [ -r ][ -x ][ -f file ][ -d dir ][ year ] DESCRIPTION
Xcalev is used to preload the calendar files for the xcal program with regular events in your life. It reads lines from a file (usually called regular stored in your Calendar directory. Each line in the file contains three fields separated by spaces or tabs, these are: a month name, a day in the month and some text. For example: December 25 Christmas Dec 31 New Year's Eve The order of the month and the day are optional, the program deduces the day by looking whether the string contains an initial numeric character or not. The year defaults to the current year unless the program is given a year number as an argument. This year cannot be abbreviated to two digits because xcal deals with years from year zero. There's a rough validity check on this. The string from the data line is inserted in the appropriate file and will appear in your xcal date strip. Nothing will happen if the string already exists in the file for that day. This means that it's safe to run xcalev at any time, only the strings that have altered in the regular file will be updated. To help with entering the same event for a number of days in one month, you can give a day range with a hyphen Jan 16-21 Usenix SF If you supply the -r option, xcalev will delete all the matching strings that it finds in the appropriate daily file. So, if you want to make radical changes to the regular file, you should run xcalev with the -r option to remove all the current entries from one year, edit the regular file and run xcalev to reload things. OPTIONS
The -r option makes xcalev delete rather than append entries. The -x option makes xcalev operate with Calendar files that are compatible with the xcalendar program. The -f switch is followed by a filename gives an alternative name for the regular file. If the filename does not start with a slash or a dot, then the name of your Calendar directory will be prepended to it. The -d switch is followed by a directory name and specifies an alterative location for your Calendar directory. Your home directory is prepended if the name doesn't start with a slash or a dot. FILES
$HOME/Calendar/* xc<dd><Mon><Year> A data file is day, Month in three letter format and the year. xy<Year> A year directory. xw<Day> A data file for the weekly code, one per day. SEE ALSO
xcal(1), xcalpr(1), xcal_cal(1) AUTHOR
Copyright 1993 by Peter Collinson, Hillside Systems All rights reserved. X Version 11 R5 October 1993 XCALEV(1)
All times are GMT -4. The time now is 04:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy