Sponsored Content
Operating Systems Solaris Number of files - in start of year Post 302343209 by Smiling Dragon on Wednesday 12th of August 2009 02:32:31 AM
Old 08-12-2009
Question

Quote:
Originally Posted by rajwinder
Is there any way to find "Number of files" that exists on my solaris parition in the starting of 2009 year ?
I know ctime or mtime will not help and unix wouldnt store creation time.
But ctime is the creation time. <-- Edit: Disregard this, it's not true, as pointed out by jlliagre
Quote:
Originally Posted by rajwinder
Only hope i can see ( and i am not sure if that will help ) is that my system is up from last 2 years without reboot so any place in /proc where i can find this or any other idea ?
If you are asking how to find out how many files existed on the system on Jan 1st 2009, there's no way to tell unless you ran a backup on that day.

Or are you asking something else?

Last edited by Smiling Dragon; 08-13-2009 at 03:38 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Append value(batch number) to start of records

Hi all, I am new to unix shell scripting and I am trying to append batch number that comes in Trailer record to the detailed record. TR|20080312|22881 |000000005|20080319|2202 LN|20080312|077777722220 |0000100000017|ABS LN|20080312|000799439326 |0000709943937|AA TR|20080313|22897 ... (6 Replies)
Discussion started by: kiran_418
6 Replies

2. Shell Programming and Scripting

count the number of lines that start with the number

I have a file with contents similar to this. abcd 1234 4567 7666 jdjdjd 89289 9382 92 jksdj 9823 298 I want to write a shell script which count the number of lines that start with the number (disregard the lines starting with alphabets) (1 Reply)
Discussion started by: grajp002
1 Replies

3. Shell Programming and Scripting

start line numbering with arbitrary number?

Hi, I want to do the following: Extract some lines from different files and copy them into one file, with the first column being the line number. I do this with cat file1 file2 file3 |grep 'xxx' |nl > output.file Works fine. But if I want to add data of interest from a fourth file to the... (2 Replies)
Discussion started by: paracetamol
2 Replies

4. Shell Programming and Scripting

The difference between end number in the early row and the start number in the next

Hi Power User, I'm trying to compute this kind of text file format: file1: jakarta 100 150 jakarta 170 210 beijing 220 250 beijing 260 280 beijing 290 320 new_york 330 350 new_york 370 420 tokyo 430 470 tokyo 480 ... (2 Replies)
Discussion started by: anjas
2 Replies

5. Shell Programming and Scripting

How to count number of files in directory and write to new file with number of files and their name?

Hi! I just want to count number of files in a directory, and write to new text file, with number of files and their name output should look like this,, assume that below one is a new file created by script Number of files in directory = 25 1. a.txt 2. abc.txt 3. asd.dat... (20 Replies)
Discussion started by: Akshay Hegde
20 Replies

6. Shell Programming and Scripting

How to calculate the total number of weeks from a specify year?

Hi anyone can help? How to calculate total number of weeks from a specify date, for example, 01 Jan 2012. Thx! (2 Replies)
Discussion started by: rayray2013
2 Replies

7. Shell Programming and Scripting

Delete files using year

Hi All, how can i delete files from my Unix directory on the basis of year, i have files from 2001 to till 2014, but from their, i have to delete only 2013 file.Below is my file name rwxrwxrwx 1 guopt users 5169 Jul 12 00:30 grt592_20130712003000.SAP Thanks Kki (2 Replies)
Discussion started by: kki
2 Replies

8. Shell Programming and Scripting

Merging two year files

Hi All, I need to merge few files as belowABC_NYFWFX.txt ABC_NYFQTFX.txt ABC_NYFMAFX.txt ABC_NYFAVFX.txt ABC_CYFWFX.txt ABC_CYFQTFX.txt ABC_CYFMAFX.txt ABC_CYFAVFX.txt ABC_CYBWFX.txt ABC_NYFWFX.txt & ABC_CYFWFX.txt should be merged into a single file and name should be... (3 Replies)
Discussion started by: Hypesslearner
3 Replies

9. UNIX for Beginners Questions & Answers

Best way to increment weeks based on fiscal start year

Hi Folks - I'm looking for the best way to to increment fiscal weeks - allow me to explain. At my one client, 10/01/17 was the beginning if year fiscal year 2018. Each week, I need to manage a unique set of variable that are updated in my application - they are called substitution variables.... (31 Replies)
Discussion started by: SIMMS7400
31 Replies

10. Shell Programming and Scripting

Start process on X number of files and then wait for the next batch

Thanks for RudiC for his extraordinary help on organizing files in a batch of 10 using below code. FL=($(ls)); for ((i=0;i<=${#FL};i++)); do for j in ${FL:$i:10}; do $batch ${j} ${j}.txt done; echo "Pausing for next iteration"; echo... (6 Replies)
Discussion started by: busyboy
6 Replies
TMPWATCH(8)						   System Administrator's Manual					       TMPWATCH(8)

NAME
tmpwatch - removes files which haven't been accessed for a period of time SYNOPSIS
tmpwatch [-u|-m|-c] [-faqstv] [--verbose] [--force] [--all] [--test] [--fuser ] [--atime|--mtime|--ctime] [--quiet] <hours> <dirs> DESCRIPTION
tmpwatch recursively removes files which haven't been accessed for a given number of hours. Normally, it's used to clean up directories which are used for temporary holding space such as /tmp. When changing directories, tmpwatch is very sensitive to possible race conditions and will exit with an error if one is detected. It does not follow symbolic links in the directories it's cleaning (even if a symbolic link is given as its argument), will not switch filesystems, and only removes empty directories and regular files. By default, tmpwatch dates files by their atime (access time), not their mtime (modification time). If files aren't being removed when ls -l implies they should be, use ls -u to examine their atime to see if that explains the problem. If the --atime, --ctime or --mtime options are used in combination, the decision about deleting a file will be based on the maximum of this times. The hours parameter defines the threshold for removing files. If the file has not been accessed for hours hours, the file is removed. Fol- lowing this, one or more directories may be given for tmpwatch to clean up. OPTIONS
-u, --atime Make the decision about deleting a file based on the file's atime (access time). This is the default. -m, --mtime Make the decision about deleting a file based on the file's mtime (modification time) instead of the atime. -c, --ctime Make the decision about deleting a file based on the file's ctime (inode change time) instead of the atime; for directories, make the decision based on the mtime. -a, --all Remove all file types, not just regular files and directories. -d, --nodirs Do not attempt to remove directories, even if they are empty. -f, --force Remove files even if root doesn't have write access (akin to rm -f). -t, --test Doesn't remove files, but goes through the motions of removing them. This implies -v. -s, --fuser Attempt to use the "fuser" command to see if a file is already open before removing it. Not enabled by default. Does help in some circumstances, but not all. Dependent on fuser being installed in /sbin. -v, --verbose Print a verbose display. Two levels of verboseness are available -- use this option twice to get the most verbose output. SEE ALSO
cron(1), ls(1), rm(1), fuser(1) WARNINGS
GNU-style long options are not supported on HP-UX. AUTHORS
Erik Troan <ewt@redhat.com> Preston Brown <pbrown@redhat.com> Nalin Dahyabhai <nalin@redhat.com> 4th Berkeley Distribution Wed Nov 28 2001 TMPWATCH(8)
All times are GMT -4. The time now is 02:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy