Sponsored Content
Full Discussion: File not found using find
Top Forums UNIX for Dummies Questions & Answers File not found using find Post 302448846 by chris01010 on Friday 27th of August 2010 07:08:49 AM
Old 08-27-2010
File not found using find

Hi,

i'm currently writing a script which tidys up old files. When using the find command I found that some files were not being listed

Code:
/export/home/ops***/test: ls -l processed
total 0
-rw-rw-r--   1 ops***   ******         0 Apr 20 11:53 test99
/export/home/ops***/test: ls -l  
total 4
drwxrwxr-x   2 ops***   ******       512 Aug 27 11:51 processed
-rw-rw-r--   1 ops***   ******         0 Aug 26 11:31 test1
-rw-rw-r--   1 ops***  ******         0 Aug 27 02:00 test2
-rw-rw-r--   1 ops***   ******         0 Aug 27 10:29 test3
-rw-rw-r--   1 ops***   ******         0 Aug 27 10:29 test4
-rw-rw-r--   1 ops***   ******         0 Aug 27 10:51 test5
-rwxrwxrwx   1 ops***   ******       361 Aug 27 11:47 tidy.ksh
/export/home/ops***/test: find . -type f -mtime 1
./test1
/export/home/ops***/test: find ./processed -type f -mtime 1
/export/home/ops***/test:

Any ideas why test1 is displayed and no test99

Thanks

Chris

Last edited by Scott; 08-27-2010 at 08:15 AM.. Reason: Code tags, please...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with find command and list in a long format each found file

The purpose of those comands are to find the newest file in a directory acvrdind to system date, and it has to be recursively found in each directory. The problem is that i want to list in a long format every found file, but the commands i use produce unexpected results ,so the output lists in a... (5 Replies)
Discussion started by: alexcol
5 Replies

2. UNIX for Dummies Questions & Answers

find and remove rows from file where multi occurrences of character found

I have a '~' delimited file of 6 - 7 million rows. Each row should contain 13 columns delimited by 12 ~'s. Where there are 13 tildes, the row needs to be removed. Each row contains alphanumeric data and occasionally a ~ ends up in a descriptive field and therefore acts as a delimiter, resulting in... (1 Reply)
Discussion started by: kpd
1 Replies

3. Shell Programming and Scripting

find a value in a file and echo if found

I need to awk a value out of a file and see if it exists in another file. My if statement below returns a positive even if the value doesn't exist. The kky3 is finding the correct field for the value. cat $PRE | while read a do kky2=`echo $a | awk -F: '{print $2}'` echo "kky2 "... (5 Replies)
Discussion started by: MizzGail
5 Replies

4. Shell Programming and Scripting

To find the line no, where the particular pattern is not found

Hi, suppose i have a txt file containing thye following data 2012156|sb3|nwknjps|BAYONNE|NJ|tcg 201221|094|mtnnjprc:HACKENSACK|NJ|tcg 201222|wn3|mtnnjtc|HACKENSACK|NJ|tcg 2018164|ik4|mtnntc|JERSEY CITY|NJ|tcg 20123482|ik4|mtnnjpritc,JERSEY CITY|NJ|tcg... (3 Replies)
Discussion started by: priyanka3006
3 Replies

5. UNIX for Dummies Questions & Answers

Using find -d and copying to the found directories

Hi again All :) After posting my first thread just a few eeks ago and having such a great response (Thank You once again :) ), I thought I'd perhaps ask the experts again. In short I'm trying to achieve a "find" and "copy" where the find needs to find directories: find -d -name outbox and... (6 Replies)
Discussion started by: Dean Rotherham
6 Replies

6. Shell Programming and Scripting

find with xargs to rm found files

I believe what is happening is rm is executing in the script on every directory and on failure of the first it stops although returns status 0. find $HOME -name /directory/filename | xargs -l rm This is the code I use but file remains. I am using sun solaris system which has way limited... (4 Replies)
Discussion started by: Ebodee
4 Replies

7. Linux

Find String in FileName and move the String to new File if not found

Hi all, I have a question.. Here is my requirement..I have 500 files in a path say /a/b/c I have some numbers in a file which are comma seperated...and I wanted to check if the numbers are present in the FileName in the path /a/b/c..if the number is there in the file that is fine..but if... (1 Reply)
Discussion started by: us_pokiri
1 Replies

8. UNIX for Dummies Questions & Answers

How to find a file based on pattern & return the filename if found?

Hi all, I am a newbie here. I have this requirement to find a file based on a pattern then return the filename if found. I created a script based on online tutorials. Though, I am stuck & really appreciate if anyone can have a quick look & point me to the right direction? #Script starts... (10 Replies)
Discussion started by: buster_t
10 Replies

9. Shell Programming and Scripting

Find header in a text file and prepend it to all lines until another header is found

I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty. I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies

10. Shell Programming and Scripting

Assistance with my Find command to identify last part of a file name and report the name found

Hello Forum, We have two bootstraps of Chef in our environment which are identified by colour: /var/chef/cache/cookbooks/bootstrap_cookbooks_version_green and /var/chef/cache/cookbooks/bootstrap_cookbooks_version_red I'm attempting to identify which version is installed based on the name... (11 Replies)
Discussion started by: greavette
11 Replies
QUOTACHECK(8)						    BSD System Manager's Manual 					     QUOTACHECK(8)

NAME
quotacheck -- filesystem quota consistency checker SYNOPSIS
quotacheck [-g] [-u] [-v] filesystem ... quotacheck [-g] [-u] [-v] -a DESCRIPTION
Quotacheck examines each filesystem, builds a table of current disk usage, and compares this table against that recorded in the disk quota file for the filesystem. If any inconsistencies are detected, both the quota file and the current system copy of the incorrect quotas are updated (the latter only occurs if an active filesystem is checked). By default both user and group quotas are checked. Available options: -a If the -a flag is supplied in place of any filesystem names, quotacheck will check all the read-write filesystems with an existing mount option file at its root. The mount option file specifies the types of quotas that are to be checked. -g Only group quotas are checked. The mount option file, .quota.ops.group, must exist at the root of the filesystem. -u Only user quotas are checked. The mount option file, .quota.ops.user, must exist at the root of the filesystem. -v quotacheck reports discrepancies between the calculated and recorded disk quotas. Specifying both -g and -u is equivalent to the default. Parallel passes are run on the filesystems required, in an identical fashion to fsck(8). Normally quotacheck operates silently. Quotacheck expects each filesystem being checked to have quota data files named .quota.user and/or .quota.group located at the filesystem root. If a binary data file is not present, quotacheck will create it. The default filename and root location cannot be overridden. Quotacheck is normally run at fsck time. Quotacheck accesses the raw device in calculating the actual disk usage for each user. Thus, the filesystems checked should be quiescent while quotacheck is running. FILES
Each of the following quota files is located at the root of the mounted filesystem. The mount option files are empty files whose existence indicates that quotas are to be enabled for that filesystem. The binary data files will be created by quotacheck, if they don't already exist. .quota.user data file containing user quotas .quota.group data file containing group quotas .quota.ops.user mount option file used to enable user quotas .quota.ops.group mount option file used to enable group quotas SEE ALSO
quota(1), quotactl(2), edquota(8), fsck(8), quotaon(8), repquota(8) HISTORY
The quotacheck command appeared in 4.2BSD. 4.2 Berkeley Distribution October 17, 2002 4.2 Berkeley Distribution
All times are GMT -4. The time now is 01:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy