Sponsored Content
Operating Systems AIX Can I search between file names? Post 302363991 by bbbngowc on Wednesday 21st of October 2009 08:16:21 PM
Old 10-21-2009
Can I search between file names?

Hi,

I have a large number of files that have in the file name a date stamp such as "091021". Is there a way to search for files where the name falls between dates in the name?

Ex: find . -type f -name "*091001* - *091021*" -exec ls -l {} \;

Something like that.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reading file names from a file and executing the relative file from shell script

Hi How can i dynamically read files names from a list file and execute them from a single shell script. Please help its urgent Thanks in Advance (4 Replies)
Discussion started by: anushilrai
4 Replies

2. Shell Programming and Scripting

Searching for file names in a directory while ignoring certain file names

Sun Solaris Unix Question Haven't been able to find any solution for this situation. Let's just say the file names listed below exist in a directory. I want the find command to find all files in this directory but at the same time I want to eliminate certain file names or files with certain... (2 Replies)
Discussion started by: 2reperry
2 Replies

3. Shell Programming and Scripting

search file names

I want to search files with find command and have following condition, but wants to ignore all pictures format like *.png,*.jpg,*.gif wants to search *backup* *bak* *test* -- __ numbers in file name *temp* *tmp* (5 Replies)
Discussion started by: learnbash
5 Replies

4. Shell Programming and Scripting

Split File by Pattern with File Names in Source File... Awk?

Hi all, I'm pretty new to Shell scripting and I need some help to split a source text file into multiple files. The source has a row with pattern where the file needs to be split, and the pattern row also contains the file name of the destination for that specific piece. Here is an example: ... (2 Replies)
Discussion started by: cul8er
2 Replies

5. Shell Programming and Scripting

Perl - use search keywords from array and search a file and print 3rd field when matched

Hi , I have been trying to write a perl script to do this job. But i am not able to achieve the desired result. Below is my code. my $current_value=12345; my @users=("bob","ben","tom","harry"); open DBLIST,"<","/var/tmp/DBinfo"; my @input = <DBLIST>; foreach (@users) { my... (11 Replies)
Discussion started by: chidori
11 Replies

6. Shell Programming and Scripting

Change the file name and copy old file content to new file names.

Hi, I have a files in a directory as below :- ls -1 mqdepth-S1STC02 proc-mq-S1STC01 proc-mq-S1STC02 proc-mq-S1STC03 Whereever i have S1STC i need to copy them into new file with file name S2STC. expected output :- ls -1 mqdepth-S2STC02 proc-mq-S2STC01 proc-mq-S2STC02... (3 Replies)
Discussion started by: satishmallidi
3 Replies

7. Shell Programming and Scripting

Retrieving the relevant search from search file in the main file

I have two files: file 1: hello.com neo.com,japan.com,example.com news.net xyz.com, telecom.net, highlands.net, software.com example2.com earth.net, abc.gov.uk file 2: neo.com example.com abc.gov.uk file 2 are the search keys to search in file 1 if any of the search... (7 Replies)
Discussion started by: csim_mohan
7 Replies

8. Shell Programming and Scripting

Exclude certain file names while selectingData files coming in different names in a file name called

Data files coming in different names in a file name called process.txt. 1. shipments_yyyymmdd.gz 2 Order_yyyymmdd.gz 3. Invoice_yyyymmdd.gz 4. globalorder_yyyymmdd.gz The process needs to discard all the below files and only process two of the 4 file names available ... (1 Reply)
Discussion started by: dsravanam
1 Replies

9. Shell Programming and Scripting

Read in search strings from text file, search for string in second text file and output to CSV

Hi guys, I have a text file named file1.txt that is formatted like this: 001 , ID , 20000 002 , Name , Brandon 003 , Phone_Number , 616-234-1999 004 , SSNumber , 234-23-234 005 , Model , Toyota 007 , Engine ,V8 008 , GPS , OFF and I have file2.txt formatted like this: ... (2 Replies)
Discussion started by: An0mander
2 Replies

10. Shell Programming and Scripting

Search for names in one list in another and print results

Hi All , New to the Bash / Shell programming world and looking for some help I have two files 1: Contains a list of names : eg STEVE BOB CRAIG 2: Contains information with those included names but also others that are not in the list (1 Reply)
Discussion started by: Lonerg550
1 Replies
NOTMUCH-SEARCH(1)					      General Commands Manual						 NOTMUCH-SEARCH(1)

NAME
notmuch-search - Search for messages matching the given search terms. SYNOPSIS
notmuch search [options...] <search-term>... DESCRIPTION
Search for messages matching the given search terms, and display as results the threads containing the matched messages. The output consists of one line per thread, giving a thread ID, the date of the newest (or oldest, depending on the sort option) matched message in the thread, the number of matched messages and total messages in the thread, the names of all participants in the thread, and the subject of the newest (or oldest) message. See notmuch-search-terms(7) for details of the supported syntax for <search-terms>. Supported options for search include --format=(json|text) Presents the results in either JSON or plain-text (default). --output=(summary|threads|messages|files|tags) summary Output a summary of each thread with any message matching the search terms. The summary includes the thread ID, date, the num- ber of messages in the thread (both the number matched and the total number), the authors of the thread and the subject. threads Output the thread IDs of all threads with any message matching the search terms, either one per line (--format=text) or as a JSON array (--format=json). messages Output the message IDs of all messages matching the search terms, either one per line (--format=text) or as a JSON array (--format=json). files Output the filenames of all messages matching the search terms, either one per line (--format=text) or as a JSON array (--for- mat=json). tags Output all tags that appear on any message matching the search terms, either one per line (--format=text) or as a JSON array (--format=json). --sort=(newest-first|oldest-first) This option can be used to present results in either chronological order (oldest-first) or reverse chronological order (new- est-first). Note: The thread order will be distinct between these two options (beyond being simply reversed). When sorting by oldest-first the threads will be sorted by the oldest message in each thread, but when sorting by newest-first the threads will be sorted by the newest message in each thread. By default, results will be displayed in reverse chronological order, (that is, the newest results will be displayed first). --offset=[-]N Skip displaying the first N results. With the leading '-', start at the Nth result from the end. --limit=N Limit the number of displayed results to N. --exclude=(true|false|flag) Specify whether to omit messages matching search.tag_exclude from the search results (the default) or not. The extra option flag only has an effect when --output=summary In this case all matching threads are returned but the "match count" is the number of matching non-excluded messages in the thread. SEE ALSO
notmuch(1), notmuch-config(1), notmuch-count(1), notmuch-dump(1), notmuch-hooks(5), notmuch-new(1), notmuch-reply(1), notmuch-restore(1), notmuch-search-terms(7), notmuch-show(1), notmuch-tag(1) Notmuch 0.13.2 2012-06-01 NOTMUCH-SEARCH(1)
All times are GMT -4. The time now is 05:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy