Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dcheck(8) [bsd man page]

DCHECK(8)						      System Manager's Manual							 DCHECK(8)

NAME
dcheck - file system directory consistency check SYNOPSIS
dcheck [ -i numbers ] [ filesystem ] DESCRIPTION
Dcheck reads the directories in a file system and compares the link-count in each i-node with the number of directory entries by which it is referenced. If the file system is not specified, a set of default file systems is checked. The -i flag is followed by a list of i-numbers; when one of those i-numbers turns up in a directory, the number, the i-number of the direc- tory, and the name of the entry are reported. The program is fastest if the raw version of the special file is used, since the i-list is read in large chunks. SEE ALSO
filsys(5), clri(8), fsck(8), icheck(8), ncheck(8) DIAGNOSTICS
When a file turns up for which the link-count and the number of directory entries disagree, the relevant facts are reported. Allocated files which have 0 link-count and no entries are also listed. The only dangerous situation occurs when there are more entries than links; if entries are removed, so the link-count drops to 0, the remaining entries point to thin air. They should be removed. When there are more links than entries, or there is an allocated file with neither links nor entries, some disk space may be lost but the situation will not degenerate. BUGS
Since dcheck is inherently two-pass in nature, extraneous diagnostics may be produced if applied to active file systems. Default file sys- tems vary with installation so dcheck should use fstab(5). 3rd Berkeley Distribution DCHECK(8)

Check Out this Related Man Page

dcheck(8)						      System Manager's Manual							 dcheck(8)

Name
       dcheck - check directory consistency

Syntax
       /etc/dcheck [ -i numbers ] [ filesystem ]

Description
       The command is obsoleted for normal consistency checking by

       The command reads the directories in a file system and compares the link-count in each i-node with the number of directory entries by which
       it is referenced.  If the file system is not specified, a set of default file systems is checked.

       The -i flag is followed by a list of i-numbers; when one of those i-numbers turns up in a directory, the number, the i-number of the direc-
       tory, and the name of the entry are reported.

       The program is fastest if the raw version of the special file is used, since the i-list is read in large chunks.

Diagnostics
       When  a	file  turns  up for which the link-count and the number of directory entries disagree, the relevant facts are reported.  Allocated
       files which have 0 link-count and no entries are also listed.  The only dangerous situation occurs when there are more entries than  links.
       If entries are removed, so the link-count drops to 0, the remaining entries point to nothing.  They should be removed.  When there are more
       links than entries, or there is an allocated file with neither links nor entries, some disk space may be lost but the  situation  will  not
       degenerate.

Restrictions
       Since is inherently two-pass in nature, extraneous diagnostics may be produced if applied to active file systems.

Files
       Default file systems vary with installation.

See Also
       fs(5), clri(8), fsck(8), icheck(8), ncheck(8)

																	 dcheck(8)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

current situation

hello..what is the current situation or lastest version of UNIX?? Is there any where i can read more about it?? (2 Replies)
Discussion started by: joanne6298
2 Replies

2. UNIX for Dummies Questions & Answers

Number Swaping.... in file

I have a file having entries like 1270 (about 55000 entries like this). i want to swap these numbers like 2107... Any Idea (3 Replies)
Discussion started by: muneebr
3 Replies

3. UNIX for Dummies Questions & Answers

Searching list of entries in file for actual files in dir

Hi all, I have a file entries.txt that contains a number of entries all on seperate lines e.g. test1 test2 test3 test4 Then in a directory called /TestFiles I have a number of files that could contain the above text in the file name e.g. qwertytest1.csv qwertytest2.csv... (2 Replies)
Discussion started by: not4google
2 Replies

4. Shell Programming and Scripting

count of files

How to count the number of files in a directory. Thanks Mahalakshmi.A (13 Replies)
Discussion started by: mahalakshmi
13 Replies

5. UNIX for Dummies Questions & Answers

Listing all links in a file system

How would one find and list all links in a file system? My situation is that I built several servers for disaster recovery, mirror images of several servers in our main location. Instead of doing a "ls -l" on every file system down the /usr structor to verify that I have all the necessary links... (3 Replies)
Discussion started by: ruger14
3 Replies

6. UNIX for Dummies Questions & Answers

Space problem in files

Hi, I have a file containing a list of entries. Want to do ls on them. for a in `cat <list.txt>`; do ls $a; done; Now some entries contain spaces. How do i incorporate space in $a. Quoting $a in "" doesn't help. Thanks (6 Replies)
Discussion started by: vibhor_agarwali
6 Replies

7. Shell Programming and Scripting

count number of files in a directory

what's the script to do that? i want to only count the number of files in that directory, not including any sub directories at all (5 Replies)
Discussion started by: finalight
5 Replies

8. Shell Programming and Scripting

Grouping data numbers in a text file into prescribed intervals and count

I have a text file that contains numbers (listed from the smallest to the largest). For ex. 34 817 1145 1645 1759 1761 3368 3529 4311 4681 5187 5193 5199 5417 5682 . . (5 Replies)
Discussion started by: Lucky Ali
5 Replies

9. Shell Programming and Scripting

Trying to do a count on multiple lines in a file

Guys I am having a problem with being able to do a count of entries in a file. What I am trying to get a count of the total number of members that are listed in the files. So I need to pull the number of the lines after members. I tried using sed but it only seems to count the first... (7 Replies)
Discussion started by: scottzx7rr
7 Replies

10. Shell Programming and Scripting

Comment entries in the file

Legends, Please help me out to come out of below situation. I have a file ABC.txt with the following entries. (example below. actual entries are more than 200 lines) PM3_fun PM4_fun FIMr_mrg ... (5 Replies)
Discussion started by: sdosanjh
5 Replies

11. AIX

Fastest way to count big amount of files in sub directory

Hi, what happened is we want to count all the files in a directory and inside this directory got many folders and so take long time to count it. Already run for about few minutes but still not done. The command we use to count is find . -type f | wc -l Just wondering if there is any other... (9 Replies)
Discussion started by: ngaisteve1
9 Replies

12. UNIX for Dummies Questions & Answers

count no of directories

hi all, i want to count no of files and directories in current directory , seperately... (3 Replies)
Discussion started by: sonu_pal
3 Replies

13. Shell Programming and Scripting

Request to check:remove entries with N/A entries

Hi I have a file with numerous entries some entries are 1 mani 2 kavya 3 N/A 4 Praveeen 5 N/A and so on How to remove entries with N/A so the result will be 1 mani 2 kavya 3 Praveeen (6 Replies)
Discussion started by: manigrover
6 Replies

14. Shell Programming and Scripting

Request to check:count specific entries

Hi all I have an input file which contains so many entries like this: And, I want to count hw many among ASN in one column are converted to LYS in third coulmns. which means output shuld contain only "ASN number LYS" Kindly let me know wny programm for this My input is ASN 217 LYS... (2 Replies)
Discussion started by: manigrover
2 Replies

15. Shell Programming and Scripting

Find duplicates in 2 & 3rd column and their ID

with below given format, I have been trying to find out all IDs for those entries with duplicate names in 2nd and 3rd columns and their count like how many time duplication happened for any name if any, 0.237788 Aaban Aahva 0.291066 Aabheer Aahlaad 0.845814 Aabid Aahan 0.152208 Aadam... (6 Replies)
Discussion started by: busyboy
6 Replies