find -ctime


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting find -ctime
Prev   Next
# 1  
Old 11-12-2012
Code find -ctime

Code:
startdate="2012_07_04-16:14:4"
path1="/home/drdos/sample"

days=0

find $path1 -name "*$startdate*" > teste.txt

while [ ${cat teste.txt | grep -c $startdate } -lt 0]
do

    find $path1 -name "*.zip" ctime $days > teste.txt
    days=`expr $days + 1`
done

echo " Files that are near the string u search are on  teste.txt"

Hi to everyone, i have one question why i get 0 results if i define the variable $startdate="2012_07_04-16:14:45", and if i define it like this $startdate="2012_07_04-16:14:4", he returns the last modified file closer to that search on the dir ?


Thanks in advance
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

What is wrong with 'find . -maxdepth 1 -ctime -7 -type f'?

Have you tried running the command below? On the same RHEl 6.8 or 6.6. It will give you different output. find . -maxdepth 1 -ctime -7 -type f rpm -qa|grep find findutils-4.4.2-9.el6.x86_64 # cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.8 (Santiago) # (6 Replies)
Discussion started by: invinzin21
6 Replies

2. Shell Programming and Scripting

find -ctime -1 cannot find files without extention

The problem is this one. I tar and gzip files on remote server find . -ctime -1 | tar -cvf transfer_dmz_start_daily.tar *${Today}*.*; Command find . -ctime -1 Doesn't find files without extension .csv .txt I have to collect all files for current day, when the program... (1 Reply)
Discussion started by: digioleg54
1 Replies

3. Shell Programming and Scripting

find -ctime -1 cannot find files without extention

The problem is this one. I tar and gzip files on remote server Code: find . -ctime -1 | tar -cvf transfer_dmz_start_daily.tar *${Today}*.*; Command Code: find . -ctime -1 Doesn't find files without extension Code: .csv .txt I have to collect all files for current... (1 Reply)
Discussion started by: digioleg54
1 Replies

4. Answers to Frequently Asked Questions

find "/path" -type f -ctime +30

When I use the command find "/abc/xyz" -type f -ctime +30 getting the error as find:"/abc/xyz /lost+found: Permission Denied" I tired find "/abc/xyz" -type d \( ! lost+found \) -type f -ctime +30 The error is find: paths must precede expression Usage: find Tried find "/abc/xyz"... (1 Reply)
Discussion started by: anithab
1 Replies

5. Shell Programming and Scripting

find -ctime

I know that find -ctime +1 will find ALL files that have been modified that are greater than 1 day old and -ctime 1 will find files that are ONLY 1 day old -ctime -1 mean files that are less than a day old? Can find actually use this granularity? (5 Replies)
Discussion started by: BeefStu
5 Replies

6. UNIX for Advanced & Expert Users

mtime VS atime VS ctime

hi, in trying to maintain your directories, one needs to do some housekeeping like removing old files. the tool "find" comes in handy. but how would you decide which option to use when it comes to, say, deleting files that are older than 5 days? mtime - last modified atime - last accessed... (4 Replies)
Discussion started by: pinoy43v3r
4 Replies

7. Shell Programming and Scripting

how to find ot ctime , mtime ,atime

Can any one tell me how to find out ctime , mtime ,atime for a file/directory on unix. Cheers, Nilesh (5 Replies)
Discussion started by: nilesrex
5 Replies

8. Tips and Tutorials

mtime, ctime, and atime

Unix keeps 3 timestamps for each file: mtime, ctime, and atime. Most people seem to understand atime (access time), it is when the file was last read. There does seem to be some confusion between mtime and ctime though. ctime is the inode change time while mtime is the file modification time. ... (2 Replies)
Discussion started by: Perderabo
2 Replies

9. UNIX for Dummies Questions & Answers

mtime vs ctime

:D i have a slight problem and would appreciate if someone could clarify the confusion.. i use find alot and so far i have done ok.. but it just struck me a couple of days ago that I am not quite sure what the difference between the modification time and the change time as in ctime and mtime and... (3 Replies)
Discussion started by: moxxx68
3 Replies

10. UNIX for Dummies Questions & Answers

ctime & find

I am trying to figure out the syntax to use find to remove files older than 30 minutes. I know that this will work for files 1 day old, but cannot seem to trim the time down to 30 minutes. find /path/to/file -ctime +1 -exec rm -f {} \; (1 Reply)
Discussion started by: 98_1LE
1 Replies
Login or Register to Ask a Question
MBK_CATA_LIB(1) 					     MBK ENVIRONMENT VARIABLES						   MBK_CATA_LIB(1)

NAME
MBK_CATA_LIB - define the mbk catalog directory SYNOPSYS
c-shell running setenv MBK_CATA_LIB path1:path2:path3:...:...:pathn ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in Paris, France. Web : http://asim.lip6.fr/recherche/alliance/ E-mail : alliance-users@asim.lip6.fr DESCRIPTION
MBK_CATA_LIB sets the directories that are to be searched thru for reading. When instanciating a cell for example, the first cell that is found with the given name is loaded in memory. The seaching mecanism first look in MBK_WORK_LIB(1), and then, in path1 thru pathn, in the order defined by the user when typing the setenv command. This directories are considered to be, from a mbk point of view, read only. The pathi arguments must be actually accessible pathes on your host machine. ERRORS
"mbk_fopen : can't open file 'unix_path/file.xx' thru directories : path1, ..., pathn" This occurs when either the unix path is irrelevent, or when the file doesn't exist. This can also be a unix right problem if the file is not accessible for reading, but this is seldom. EXAMPLE
setenv MBK_CATA_LIB ~fred/crechan/uom:/labo/sclib DIAGNOSTICS
Only the first path may be given with a '~', since the shell extents it only when seen first. SEE ALSO
mbk(3), genlib(1), MBK_WORK_LIB(1). BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory. We need your feedback to improve documentation and tools. ASIM
/LIP6 October 1, 1997 MBK_CATA_LIB(1)