Sponsored Content
Top Forums Shell Programming and Scripting FINDING DUPLICATE PROJECT ( directory project ) Post 302955795 by jcdole on Monday 21st of September 2015 03:57:32 PM
Old 09-21-2015
Quote:
Originally Posted by RudiC
How about
Code:
while read PROJ; do PROJ=${PROJ##*/}; echo $PROJ; done < $MY_TEMP_RESULT_1 | sort | uniq -d
another_project
dir_1-3-2-1-1
some_project

seems to work on a real example.
As the real problem is more complicated, this give me the way to finish by hand.

Thank you very much
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

project

i want to do hospital project in c++ or java in unix/linux platforms what are the required softwares i should have and how to install oracle,java in linux (1 Reply)
Discussion started by: nrusimha
1 Replies

2. Linux

project

hi, iam doing my MCA finial year project in linux-c language.my project name 'stream control transmission protocol'.it is about message passing to server from client through packet,please help in this i want to know the coding for this or tell me the any link for this coding. ... (0 Replies)
Discussion started by: anurakrish
0 Replies

3. Shell Programming and Scripting

finding duplicate files by size and finding pattern matching and its count

Hi, I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern. Note:These are the samples of two files,but i can have more... (2 Replies)
Discussion started by: jerome Sukumar
2 Replies

4. What is on Your Mind?

r-project

Hi folks, Any folk has experience on r-Project; The R Project for Statistical Computing Please shed me some light on its main application with examples. The package is availabl on Ubuntu repo; $ apt-cache policy r-base-html r-base-html: Installed: (none) Candidate: 2.4.1-1 ... (0 Replies)
Discussion started by: satimis
0 Replies

5. Solaris

SSH doesn't pick up user's project from /etc/project

We have a system running ssh. When a user logs in, they do not get the project they are assigned to (they run under "system"). I verify the project using the command "ps -e -o user,pid,ppid,args,project". If you do a "su - username", the user does get the project they are assigned to (and all... (2 Replies)
Discussion started by: kurgan
2 Replies

6. Linux

Help me in finding ideas for Linux Project

Hi guys.. I m newbie to this forum. Basically, i need help in my final year B.E project. I will need some ideas or hints to decide my Project Topic on/for Linux. If you ask me why i choose Linux.. then i wud say I want to contribute more to open source community and eagerly want to learn... (2 Replies)
Discussion started by: SRJSRJ
2 Replies

7. Solaris

what is the use of /etc/project file and project administration commands?

i have two doubts.. 1. what is the use /etc/project file. i renamed this file and when i tried to switch user or login with some user account the login was happening slowly. but when i renamed it to original name it was working fine... why so? 2. unix already has useradd and grouadd for... (4 Replies)
Discussion started by: chidori
4 Replies

8. UNIX and Linux Applications

Need ideas for graduation project based on unix or linux Need ideas for graduation project based on

Dear all, i am in last year of electronics department in engineering faculty i need suggestions for a graduation project based on unix or free bsd or linux and electronics "embedded linux " i think about embedded unix for example or device drivers please i need helps (1 Reply)
Discussion started by: MOHA-1
1 Replies

9. News, Links, Events and Announcements

A new project was posted on The UNIX and Linux Forums project board.

A new project was posted on your project board. Project title: Bash Shell Tutoring Estimated Budget: $50/hr Start date: Immediately Required skills: Linux, Bash, Shell, UNIX I work as a datawarehouse designer and developer. Although I usually stick to the role of an analyst,... (0 Replies)
Discussion started by: Neo
0 Replies
nvbmtpg(8)						      System Manager's Manual							nvbmtpg(8)

NAME
nvbmtpg - Display pages of an AdvFS BMT file SYNOPSIS
/sbin/advfs/nvbmtpg [-R] [-v] { domain_id | bmt_id } [-f] /sbin/advfs/nvbmtpg [-R] [-v] bmt_id page [-f] /sbin/advfs/nvbmtpg [-R] [-v] bmt_id page mcell [-c] /sbin/advfs/nvbmtpg [-R] [-v] bmt_id [-a] /sbin/advfs/nvbmtpg [-R] [-v] domain_id fileset_id [file_id] [-c] /sbin/advfs/nvbmtpg [-R] [-v] { domain_id | volume_id } -l /sbin/advfs/nvbmtpg [-R] [-v] bmt_id -s b block [-c] /sbin/advfs/nvbmtpg [-R] [-v] domain_id fileset_id -s f frag [-c] /sbin/advfs/nvbmtpg [-R] [-v] { bmt_id | domain_id [fileset_id] } -s t tag [-c] /sbin/advfs/nvbmtpg [-R] [-v] volume_id -b block [mcell] /sbin/advfs/nvbmtpg [-R] volume_id -d dump_file OPTIONS
Display all the pages in the BMT. Specifies the logical block number of a disk block on an AdvFS volume. Display the entire chain of mcells. Alternatively, continue to search. Specifies the name of a file that will hold the contents of the specified BMT file. Display the number of free mcells. Display the deferred delete list of mcells. Specifies that information about the Reserved Bitmap Metadata Ta- ble (RBMT) is to be displayed, instead of information about the BMT. Specifies the logical block number of a disk block on an AdvFS vol- ume. When you use this option, the utility searches the specified BMT file for a mcell that has an extent record for a file that contains the specified block. Specifies the number of a file fragment in the frag file for a fileset. When you use this option, the utility searches all BMT files (there is one on each AdvFS volume) for a mcell that: Belongs to a file in the specified fileset Has an attribute record that indicates the file is using the specified frag ID. Specifies the file tag number. When you use this option, the utility searches one or all of the BMT files for a mcell with this tag. Display all the data in a specified mcell. OPERANDS
Specifies the BMT file on an AdvFS volume or a BMT file that has been saved by the utility as a dump_file. Use the following format: Spec- ify the -F option to force the utility to interpret the name you supply as a file name. Specifies an AdvFS file domain using the following format: By default, the utility opens all volumes using block device special files. Specify the -r option to operate on the raw device (character device special file) of the domain instead of the block device. Specify the [-D] option to force the utility to interpret the name you supply in the domain argument as a domain name. Specifies an AdvFS volume using the following format: Specify the -V option to force the utility to interpret the name you supply in the volume argument as a volume name. The volume name argument also can be a full or partial path for the volume, for example /dev/disk/dsk12a or dsk12a. Specifying a partial path name always opens the character device spe- cial file. Alternatively, specify the volume by using arguments for its domain, domain_id, and its volume index number, volume_index. Speci- fies an AdvFS fileset using the following format: Specify the [-S] option to force the command to interpret the name you supply as a fileset name. Specify the fileset by entering either the name of the fileset, fileset, or the file's fileset tag number, -T file- set_tag. Specifies a file name in the following format: Specify the file by entering either the fileset relative pathname, file, or the file's tag number, -t file_tag. Specifies the number of a metadata cell (mcell) in a BMT file. Specifies the file page number of the BMT file. DESCRIPTION
The nvbmtpg utility formats, dumps, and displays pages of the Bitfile Metadata Table (BMT) files. For Tru64 UNIX Version 5.0 and beyond, the utility also formats, dumps, and displays pages of the Reserved Bitfile Metadata Table (RBMT) files. RBMT files are metadata structures that extend BMT files. BMTs are composed of mcells. Each file in an AdvFS domain is described by a collection of mcells. The mcells for each file are chained together. The first mcell in a chain is called the primary mcell. There is one BMT file on each volume of an AdvFS domain. A BMT file is an array of 8 Kbyte file pages, each page containing a header and an array of metadata cells (mcells). The purpose of a BMT file is to contain all the metadata for all files that are stored on an AdvFS volume. This utility has the following functions: Display a summary of the BMT on one AdvFS volume or a summary of all the BMT files (there is one per volume) in a domain. Display a page of mcells or one mcell or a chain of mcells. The page can be specified by a BMT page number or a volume block number. An mcell can be specified by a number or by specifying the primary mcell of a file. Search for an mcell. The search can be for an extent that maps a volume block or a file that uses a given frag ID. Display a Summary of BMTs By specifying just a domain and (possibly) the -f option, you cause the utility to display a summary of the BMT on all volumes in the domain. Without the -f option, the summary shows how long the BMT is, in pages. With the -f option, the summary also displays how many free mcells are in the BMT for each volume. For example, the following command causes the utility to read BMT page 0 (zero) in every volume of the domain and display the number of pages in each BMT, the number of extents used to describe the BMT, and the number of free mcells in BMT page 0: # /sbin/advfs/nvbmtpg -r my_domain For example, the following command causes the utility to read the entire BMT in every volume of the domain and display the number of pages in each BMT, the number of extents use, and the number of free mcells in BMT page 0. In addition, the utility displays the number of free mcells not on page 0: # /sbin/advfs/nvbmtpg my_domain -f Specifying just a volume (and possibly the -f option) displays a summary for the BMT on that volume. Two examples are: # /sbin/advfs/nvbmtpg -D my_domain 1 -f # /sbin/advfs/nvbmtpg dsk12c Displaying a BMT Page The utility can display information from a specified BMT page. It can display the whole page or one mcell on a page. It can also display all the mcells on an AdvFS volume. Each AdvFS volume contains its own BMT file, so you must specify the volume and the page to get the page you want to display. For example, to display the first page (page 0) of the BMT on volume /dev/disk/dsk5a, you would enter the following command: # /sbin/advfs/nvbmtpg /dev/disk/dsk5a 0 The volume can also be specified by domain name and volume index. For example, to display page 0 or volume 1 of the domain_1 domain, enter the following command: # /sbin/advfs/nvbmtpg domain_1 1 0 You can specify a single mcell to display. For example, you could display mcell 5 on page 4 of the third AdvFS volume in the file domain domain_1 by entering the following command: # /sbin/advfs/nvbmtpg domain_1 3 4 5 To display all the mcells on dsk5a, enter the following command: # /sbin/advfs/nvbmtpg /dev/disk/dsk5a -a Note This use of the command can generate megabytes of output: use it carefully. Displaying Primary mcells The primary mcell of a file in an AdvFS domain is the first mcell in a chain of mcells that describe the file. The primary mcell for a fileset in an AdvFS domain is the first mcell in a chain of mcells that describes the fileset. Use this utility to locate and display the primary mcell of a file or a fileset. To locate the primary mcell (for either a file or a fileset) you must uniquely identify it in the command line. A fileset can be uniquely identified by its domain and fileset names. A file can be uniquely identified by its domain, fileset, fileset relative path name. For example, you can display the primary mcell for a file file_1 in a directory dir_1 in a fileset fileset_1 in a domain domain_i by enter- ing the following command: # /sbin/advfs/nvbmtpg domain_1 fileset_1 dir_1/file_1 You can also display the primary mcell by its tag number. For example, if the file_1 had a tag number of 5, the command to display the pri- mary mcell for the file would be: # /sbin/advfs/nvbmtpg domain_1 fileset_1 -t 5 Note If there is no danger of confusing tag 5 with a file named 5 in the root directory, then the -t option is optional. Displaying mcell Chains The mcells that describe one BMT file are chained, and are not necessarily contiguous. Use the [-c] option to display these mcell chains. For example, display the entire chain of mcells that describe the file named file_1 in the root directory of the fileset named fileset_1 in the domain named domain_1, enter the following command: # /sbin/advfs/nvbmtpg domain_1 fileset_1 file_1 -c Displaying the Deferred Delete List Each volume in a domain has a linked list of mcells which represent storage to be freed. The -l option displays the mcells in this list. If just the domain is specified, the option displays the deferred delete list for every volume in the domain. For example: # /sbin/advfs/nvbmtpg domain_1 -l If an AdvFS volume is specified, the option displays the deferred delete list for that volume. For example: # /sbin/advfs/nvbmtpg dsk5c -l Displaying Corrupted Volumes If the volume is corrupted, the metadata structure needed to find specific mcells can be missing. In this case, you can specify a disk block and the utility displays a page containing the specified disk block. For example: you have a corrupted AdvFS domain, but you have the logical block number of a BMT page. To display logical block number 1024 on AdvFS volume /dev/disk/dsk5c in AdvFS domain domain, forcing it to be formatted as a BMT page, you use the following command: # /sbin/advfs/nvbmtpg dsk5c -b 1024 For example: you have a corrupted AdvFS domain, but you have a domain and an index number and the logical block number of a BMT page. To display logical block number 1024 on AdvFS volume 2 in AdvFS domain domain, forcing it to be formatted as a BMT page, you use the following command: # /sbin/advfs/nvbmtpg domain 2 -b 1024 Saving a BMT File Use the utility to read the BMT file and save it to another file. Later, you can use the utility to display information from this dump_file. For example, to save the BMT file from volume index 2 in a domain named domain_1 to a file named dump_domain.2 in the current working directory, enter the following command: # /sbin/advfs/nvbmtpg domain_1 2 -d dump_domain.2 Later, you can examine the file dump_domain.2 to obtain a summary of its BMT pages, by entering the following command: # /sbin/advfs/nvbmtpg dump_domain.2 You can also use the utility to display other information from the dump_file, such as: any mcell, a page of mcells, or the mcell free list in a page of mcells. Searching for Disk Blocks You can determine which file is using a logical block number by searching for and displaying the mcell that contains a file extent that includes that block. The mcell contains the fileset tag and the file tag number of the file that includes that block. Use the tag2name utility to find the file name. For example, you can search for a mcell record that describes the use of a disk block on an AdvFS volume. If you want to determine which file was using logical block number 1234 on AdvFS volume dsk12c, you can enter the following command: # /sbin/advfs/nvbmtpg dsk12c -s b 1234 A given block should only appear in one mcell. However, a corrupted volume may have two or more extents describing the same block. There- fore, if you want to find the disk block shown above and continue the command, searching for any files that also have a file extent that includes block 1234, you can enter the following command: # /sbin/advfs/nvbmtpg dsk12c -s b 1234 -c Searching for Fragment Files AdvFS creates one fragment file for each fileset in an AdvFS file domain. You can determine the file that is using a given file fragment ID and display the primary mcell for that file. For example, if you want to determine which file in domain domain and fileset fileset was using the fragment id 1234, you can enter the following command: # /sbin/advfs/nvbmtpg domain fileset -s f 1234 A given fragment ID can only be used by one file in a fileset. However, a corrupted fileset may have a given fragment ID used by two or more files. Therefore, if you want to find the fragment file ID above and continue the command, searching for any additional files that own the file fragment, you can enter the command: # /sbin/advfs/nvbmtpg domain fileset -s f 1234 -c Searching for a Specified Tag If you specify a domain, a fileset and a file tag (as shown before in the section on displaying primary mcells) the utility uses other metadata files in the domain to find the primary mcell in the BMT. However, the utility can also search for a mcell with a given tag with- out using any other metadata files if you specify the -s t option. This option searches a saved BMT file, or the BMT on one volume, or all the BMT files in a domain for an mcell with the tag you specify. If you specify a domain and fileset, the utility narrows the search to mcells that belong to the fileset. However, if you specify a fileset, the utility must use other metadata files in the domain. In this case, the search syntax displays the first mcell it finds that contains the specifed tag. This mcell could be (but may not be) the primary mcell for the file. To continue the search and display all mcells for the specified tag, add the -c option. The following example searches all BMT files for mcells with tag 123: # /sbin/advfs/nvbmtpg domain_1 -s t 123 -c The following example searches a saved BMT file for mcells that belong to file tag 456: # /sbin/advfs/nvbmtpg save_bmt -s t 456 -c NOTES
An active domain, which is a domain with one or more of its filesets mounted, has all of its volumes opened using block device special files. These devices cannot be opened a second time without first being unmounted. However, the character device special files for the volumes can be opened more than once while still mounted. It can be misleading to use this utility on a domain with mounted filesets because the utility does not synchronize its read requests with AdvFS file domain read and write requests. For example, the AdvFS can be writing to the disk as the utility is reading from the disk. Therefore, when you run the utility, metadata may not have been flushed in time for the utility to read it and consecutive reads of the same file page may return unpredictable or con- tradictory results. [The domain is not harmed.] To avoid this problem, unmount all the fileset in the domain before using this utility. RESTRICTIONS
The utility can fail to open a block device, even when there are no filesets mounted for the domain and the AdvFS daemon, advfsd is run- ning. The daemon, as it runs, activates the domain for a brief time. If the utility fails in this situation, run it again. EXIT STATUS
The utility returns a 0 (zero) on success, otherwise it returns a nonzero value and an error diagnostic. FILES
Specifies the command path. Specifies the AdvFS volumes in domain_name SEE ALSO
Commands: vfilepg(8), nvfragpg(8), nvlogpg(8), vsbmpg(8), nvtagpg(8), tag2name(8) nvbmtpg(8)
All times are GMT -4. The time now is 10:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy