Sponsored Content
Full Discussion: Command to find files
Top Forums UNIX for Dummies Questions & Answers Command to find files Post 302777587 by franzpizzo on Friday 8th of March 2013 06:58:45 AM
Old 03-08-2013
Hi
use the find command: in this code find in the currend directory (and not in subdir) the files with date < today and > today-6
Code:
find . ! -name . -prune -mtime +0 -mtime -6 -exec cp {} directory_that_you_want \;

I recommend to execute first this, check if the output is what you want and then execute the copy
Code:
find . ! -name . -prune -mtime +0 -mtime -6 -exec ls -lrt {} \;

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Little bit weired : Find files in UNIX w/o using find or where command

Yes , I have to find a file in unix without using any find or where commands.Any pointers for the same would be very helpful as i am beginner in shell scritping and need a solution for the same. Thanks in advance. Regards Jatin Jain (10 Replies)
Discussion started by: jatin.jain
10 Replies

2. UNIX for Dummies Questions & Answers

command to find the files under particular owner

Hi, I need a command to find a files under particular owner ?All the files in the system for the particular user id is the owner? Please help me on this? (2 Replies)
Discussion started by: jayaramanit
2 Replies

3. Shell Programming and Scripting

Deleting files using find command

I want to find the files and delete all the files except the last file. I am using find command , I am sending the find output to a file and getting all the lines except the last one and sending it to the remove command . This is not working. can anyone help me out to do it in the find command... (8 Replies)
Discussion started by: deepaklanka
8 Replies

4. UNIX for Dummies Questions & Answers

find command -- listing files twice

I noticed the other day that after i used the find command to search for some files, the computer listed them twice -- first with just the names of the files (meaning ./(then the individual file names), then with the directory name, followed by the file names (./directory name/file name). I was... (2 Replies)
Discussion started by: Straitsfan
2 Replies

5. Shell Programming and Scripting

what is the find to command to find the files created last 30 days

what is the find to command to find the files created last 30 days (5 Replies)
Discussion started by: rajkumar_g
5 Replies

6. UNIX for Dummies Questions & Answers

command to find files

Hi folks, What command/commands I have to run to find the files including their folder/subfolder which contain word-a, word-b etc. e.g. I expect to find the names of the files including their folders which contain "domain", "subdomain/sub domain", "free domain". etc. TIA B.R. satimis (11 Replies)
Discussion started by: satimis
11 Replies

7. UNIX for Dummies Questions & Answers

Find command to delete old files

Hi, I want to delete all the log files that was created on year 2008. My command is not working. Any idea? find . -name '*.log' -mtime 1460 -exec ls -lt {} \; Thank you. (2 Replies)
Discussion started by: samnyc
2 Replies

8. Shell Programming and Scripting

Find command to delete the files

Hi All, I've created 2 files touch -t 201309101234 aa10 touch -t 201309111234 aa11 Exact 60 days before from today date is SEPT 12th . As per the following command as i gave +60 means the files which were created before sept12th should be deleted find /etc/logs/*aa* -type f -atime +60... (5 Replies)
Discussion started by: smile689
5 Replies

9. Shell Programming and Scripting

Find command to find a word from list of files

I need to find a word '% Retail by State' in the folder /usr/sas/reports/RetailSalesTaxallocation. When I tried like below, -bash-4.1$ cd /usr/sas/reports/RetailSalesTaxallocation -bash-4.1$ find ./ -name % Retail by State find: paths must precede expression: Retail Usage: find ... (10 Replies)
Discussion started by: Ram Kumar_BE
10 Replies

10. Shell Programming and Scripting

Find command when there exist many files

I want to run find and wondering if it struggles when there are many files. I have tried and does not seem to complain. Is this correct? (8 Replies)
Discussion started by: kristinu
8 Replies
QB-BLACKBOX(8)						      System Manager's Manual						    QB-BLACKBOX(8)

NAME
qb-blackbox - Display "flight data" from the "blackbox". SYNOPSIS
qb-blackbox <blackbox files>... DESCRIPTION
qb-blackbox Print out the logs (including debug logs) that were recorded using libqb's blackbox. EXAMPLES
Get info to help developers diagnose a crash. $ qb-blackbox /var/lib/corosync/fdata Dumping the contents of /var/lib/corosync/fdata Mar 23 20:58:57 message_handler_orf_token():3677 install seq 0 aru 0 high seq received 0 Mar 23 20:58:57 message_handler_orf_token():3696 retrans flag count 4 token aru 0 install seq 0 aru 0 0 Mar 23 20:58:57 old_ring_state_reset():1487 Resetting old ring state Mar 23 20:58:57 deliver_messages_from_recovery_to_regular():1693 recovery to regular 1-0 Mar 23 20:58:57 memb_state_operational_enter():1779 Delivering to app 1 to 0 Mar 23 20:58:57 sync_abort():594 ENTERING sync_abort() Mar 23 20:58:57 sync_save_transitional():586 ENTERING sync_save_transitional() Mar 23 20:58:57 member_object_joined():301 Member joined: r(0) ip(192.168.122.1) Mar 23 20:58:57 sync_abort():594 ENTERING sync_abort() SEE ALSO
qblog.h(3), AUTHOR
Angus Salkeld 2012-05-28 QB-BLACKBOX(8)
All times are GMT -4. The time now is 05:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy