Sponsored Content
Top Forums UNIX for Dummies Questions & Answers List only files based on a pattern Post 302712473 by shash on Tuesday 9th of October 2012 08:22:13 AM
Old 10-09-2012
Apologies, if I 'm not clear enough. I have thousands of file with different names. I need to find the files with out a decimal place followed by a date in the file name which has been showed in the example.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remove/Find files based on position pattern

Hi All, Please help me to find or remove files based on position based search pattern. file1.txt: aaabbbccc dddeeefff iiijjjkkk file2.txt: lllmmmnnn ooopppqqq rrrsssttt file3.txt: uuuvvvwww xxxeeeyyy zzzcccooo From the above files, I like to delete the files that have "eee"... (1 Reply)
Discussion started by: kumarn
1 Replies

2. UNIX for Dummies Questions & Answers

print multiple lines from text file based on pattern list

I have a text file with a list of items/patterns: ConsensusfromCGX_alldays_trimmedcollapsedfilteredreadscontiglist(229095contigs)contig12238 ConsensusfromCGX_alldays_trimmedcollapsedfilteredreadscontiglist(229095contigs)contig34624... (1 Reply)
Discussion started by: Oyster
1 Replies

3. UNIX for Advanced & Expert Users

Moving multiple files based on the pattern

I want to search for a particular file name patterns and move them to a specific folder, is it possible to do it with awk or sed? (1 Reply)
Discussion started by: rudoraj
1 Replies

4. Shell Programming and Scripting

Copying files based on a pattern

Hi All, I need to find and list the last 5 days files in that exact name with "MIM" and copy to another directory. please help me in this there is around 30000 files Thanks Murali (7 Replies)
Discussion started by: 969murali@gmail
7 Replies

5. UNIX for Dummies Questions & Answers

Split a huge 7 GB File Based on Pattern into 4 files

Hi, I have a Huge 7 GB file which has around 1 million records, i want to split this file into 4 files to contain around 250k messages each. Please help me as Split command cannot work here as it might miss tags.. Format of the file is as below <!--###### ###### START-->... (6 Replies)
Discussion started by: KishM
6 Replies

6. Shell Programming and Scripting

Combine 3 files based on a pattern

HI, I have 3 files that contain the following information (sql output from Oracle database stored in a txt file): File1.txt : alter table "SYS"."INT_COST_PRICE" enable row movement; alter table "SYS"."INT_SOH" enable row movement; alter table "SYSMAN"."XX_ACI_SKURTP" enable row movement;... (6 Replies)
Discussion started by: rparavastu
6 Replies

7. Shell Programming and Scripting

Moving old files based on pattern

Hi all I am trying to loop through a directory of files using a given search pattern. some of the files will be duplicated due to the pattern, but of the duplicate files i wanted to move the older files to another location. Is there any straightforward way of doing this ? One of ways I... (1 Reply)
Discussion started by: sthapa
1 Replies

8. Shell Programming and Scripting

Finding all files based on pattern

Hi All, I need to find all files in a directory which are containing specific pattern. Thing is that file name should not consider if pattern is only in commented area. all contents which are under /* */ are commented all lines which are starting with -- or if -- is a part of some sentence... (13 Replies)
Discussion started by: Lakshman_Gupta
13 Replies

9. Shell Programming and Scripting

Extract date from files based on file pattern

I want to extract dates from the files and i have different types of files with pattern. I have list file with the patterns and want to date extract based on it in a sh script Files in the directory : file1_20160101.txt file2_20160101_abc.txt filexyz20160101.txt list file with... (2 Replies)
Discussion started by: lijjumathew
2 Replies

10. UNIX for Advanced & Expert Users

Concatenation of multiple files based on file pattern

Hi, I have the following reports that get generated every 1 hour and this is my requirement: 1. 5 reports get generated every hour with the names "Report.Dddmmyy.Thhmiss.CTLR" "Report.Dddmmyy.Thhmiss.ACCD" "Report.Dddmmyy.Thhmiss.BCCD" "Report.Dddmmyy.Thhmiss.CCCD"... (1 Reply)
Discussion started by: Jesshelle David
1 Replies
STRFTIME(3)						     Library Functions Manual						       STRFTIME(3)

NAME
strftime - format date and time SYNOPSIS
#include <sys/types.h> #include <time.h> #include <string.h> size_t strftime(buf, maxsize, format, timeptr) char *buf; size_t maxsize; char *format; struct tm *timeptr; DESCRIPTION
The strftime() function formats the information from timeptr into the buffer buf according to the string pointed to by format. The format string consists of zero or more conversion specifications and ordinary characters. All ordinary characters are copied directly into the buffer. A conversion specification consists of a percent sign ``%'' and one other character. No more than maxsize characters will be placed into the array. If the total number of resulting characters, including the terminating null character, is not more than maxsize, strftime() returns the number of characters in the array, not counting the terminating null. Other- wise, zero is returned. Each conversion specification is replaced by the characters as follows which are then copied into the buffer. %A is replaced by the full weekday name. %a is replaced by the abbreviated weekday name, where the abbreviation is the first three characters. %B is replaced by the full month name. %b or %h is replaced by the abbreviated month name, where the abbreviation is the first three characters. %C is equivalent to ``%a %b %e %H:%M:%S %Y'' (the format produced by asctime(3)). %c is equivalent to ``%m/%d/%y''. %D is replaced by the date in the format ``mm/dd/yy''. %d is replaced by the day of the month as a decimal number (01-31). %e is replaced by the day of month as a decimal number (1-31); single digits are preceded by a blank. %H is replaced by the hour (24-hour clock) as a decimal number (00-23). %I is replaced by the hour (12-hour clock) as a decimal number (01-12). %j is replaced by the day of the year as a decimal number (001-366). %k is replaced by the hour (24-hour clock) as a decimal number (0-23); single digits are preceded by a blank. %l is replaced by the hour (12-hour clock) as a decimal number (1-12); single digits are preceded by a blank. %M is replaced by the minute as a decimal number (00-59). %m is replaced by the month as a decimal number (01-12). %n is replaced by a newline. %p is replaced by either ``AM'' or ``PM'' as appropriate. %R is equivalent to ``%H:%M'' %r is equivalent to ``%I:%M:%S %p'' . %t is replaced by a tab. %S is replaced by the second as a decimal number (00-60). %T or %X is equivalent to "%H:%M:%S" . %U is replaced by the week number of the year (Sunday as the first day of the week) as a decimal number (00-53). %W is replaced by the week number of the year (Monday as the first day of the week) as a decimal number (00-53). %w is replaced by the weekday (Sunday as the first day of the week) as a decimal number (0-6). %x is equivalent to ``%m/%d/%y %H:%M:%S'' . %Y is replaced by the year with century as a decimal number. %y is replaced by the year without century as a decimal number (00-99). %Z is replaced by the time zone name. %% is replaced by `%' . SEE ALSO
date(1), ctime(3), printf(1), printf(3) STANDARDS
The strftime() function conforms to ANSI X C3.159-1989(``ANSI C''). BUGS
There is no conversion specification for the phase of the moon. 4.2 Berkeley Distribution April 1, 1995 STRFTIME(3)
All times are GMT -4. The time now is 06:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy