Sponsored Content
Top Forums UNIX for Dummies Questions & Answers list only directories in commandline. Post 66888 by jhmr7 on Thursday 17th of March 2005 05:06:48 PM
Old 03-17-2005
Thanks. Please find the display below.

/home/gsk/prod> ls -l | grep ^d

drwxrwxr-x 2 gsk stage 96 Mar 17 14:01 0010
drwxrwxr-x 2 gsk stage 96 Mar 17 14:01 0011
drwxrwxr-x 2 gsk stage 96 Mar 17 14:01 0014

But i need to extract only the last column i.e. only the folder names. Please let me know what i need to do. I used cut utility but i can't able to locate the column. Is there any utility which will extract the last column of the display.

TIA.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

List directories

Is there any way to list only directories in particular file system? Malay (3 Replies)
Discussion started by: malaymaru
3 Replies

2. UNIX for Dummies Questions & Answers

How to list only directories?

How to list directories (not sub-directories) from a given path? (4 Replies)
Discussion started by: videsh77
4 Replies

3. UNIX for Dummies Questions & Answers

how to list directories only

I would like to know how to list directories only without a / at the end. I would like to only see them in my current dir. for example ls - d */ gives dir1/ dir2/ dir3/ dir4/ but is there a way to get only dir1 dir2 dir3 i need it to use them as inputs in a foreach loop... (3 Replies)
Discussion started by: yodadbl07
3 Replies

4. Shell Programming and Scripting

List of directories into a nested list

I have a list of directories like this a a/b a/c a/d a/d/e a/d/f a/d/g a/d/g/h a/i I would like to convert this list into another list, nested like this a{b{} c{} d{e{} f{} g{h{}}} i{}} Here is a pseudo algorithm for this Add a: (1 Reply)
Discussion started by: Ilja
1 Replies

5. UNIX for Dummies Questions & Answers

(really basic) List directories only?

I'm looking for a Linux equivalent to the DOS dir /ad that lists the directories ("folders" in Windows) in the current directory. I looked at the ls manpage, which says -d, --directory list directory entries instead of contents, and do not... (4 Replies)
Discussion started by: CRGreathouse
4 Replies

6. Shell Programming and Scripting

Want to Get List of All directories

:confused: Hi, Is there any one-lier through which I will be able to reach to last directory excluding all files only directrory and sub-directoris should be displayed from the current path. Thanks in advance (7 Replies)
Discussion started by: niceboykunal123
7 Replies

7. Shell Programming and Scripting

How to list all the directories, sub directories in a mount along with size in ascending order?

Hi , I am very new to unix as well as shell scripting. I have to write a script for the following requirement. In a particular mount, have to list all the directories and sub directories along with size of the directory and sub directory in ascending order. Please help me in this regard and many... (4 Replies)
Discussion started by: nmakkena
4 Replies

8. UNIX for Dummies Questions & Answers

List directories and sub directories recursively excluding files

Hi, Please help me, how to get all the direcotries, its sub directories and its sub directories recursively, need to exclude all the files in the process. I wanted to disply using a unix command all the directories recursively excluding files. I tried 'ls -FR' but that display files as... (3 Replies)
Discussion started by: pointers
3 Replies

9. Shell Programming and Scripting

How to list all the files, directories and sub-directories in the current path except one directory?

Can anyone come up with a unix command that lists all the files, directories and sub-directories in the current directory except a folder called log.? Thank you in advance. (7 Replies)
Discussion started by: Manjunath B
7 Replies

10. UNIX for Dummies Questions & Answers

List the directories, having given pattern in the directories name, sorted by creation date

It is for HP-Unix B.11.31. Requirement: 1. List the directories, having given pattern in the directories name, sorted by creation date. Example: Directories with name "pkg32*" or "pkg33*" 2. On the output of 1. list the directories by creation date as sort order, with creation date... (2 Replies)
Discussion started by: Siva SQL
2 Replies
vxconfigrestore(1M)													       vxconfigrestore(1M)

NAME
vxconfigrestore - restore disk group configuration SYNOPSIS
/etc/vx/bin/vxconfigrestore [-c | -d | -n | -p] [-l directory] {dgname | dgid} DESCRIPTION
The vxconfigrestore utility is used to restore a disk group's configuration information if this has been lost or become corrupted. The disk group whose configuration is to be restore is specified either by name or by ID. Any disks whose private region headers have become corrupted are reinstalled when the disk group configuration is restored. If you choose not to reinstall the VxVM headers for these disks, it may not be possible to restore the disk group. The disk group configuration backup files may have been automatically created by the vxconfigbackupd daemon, or manually by running the vxconfigbackup command. Restoration of a disk group configuration has two stages: precommit and commit. The precommit stage allows you to temporarily load the con- figuration that is to be restored, and examine it using the vxprint utility. At this stage, the disk group configuration is read-only. No permanent changes are written to disk until you choose to commit them. If desired, you can abandon the restore operation at the precommit stage. OPTIONS
-c (Commit) Permanently commits changes to the disks. The restoration must be at the precommit stage for this command to succeed. Volumes are synchronized in the background. For large volume configurations, it may take some time to perform the synchroniza- tion. You can use the vxtask -l list command to monitor the progress of this operation. -d (Decommit) Abandons the restore operation at the precommit stage. -n (Precommit: no installation of VxVM disk header) Loads the disk group configuration at the precommit stage. This option speci- fies that disks whose private region headers have become corrupted are not to be reinstalled. -l directory Specifies a directory other than the default (/etc/vx/cbr/bk) where the backup configuration files are located. -p (Precommit: load) Loads the disk group configuration at the precommit stage. This option specifies that disks whose private region headers have become corrupted are to be reinstalled. The vxprint command can be used to examine the disk group configura- tion. Note: The volumes have not yet been synchronized at this stage. This is the default operation if no option is specified. EXAMPLES
Load the configuration of the mydg disk group from the default directory, and reinstall disks that have corrupted VxVM disk headers: vxconfigrestore -p mydg Load the configuration of the mydg1 disk group from the backup files in the directory /dgbackup/mydg1 without reinstalling any disks that have corrupted private region disk headers: vxconfigrestore -n -l /dgbackup/mydg1 mydg1 Abandon the restoration of the mydg2 disk group at the precommit stage: vxconfigrestore -d -l /dgbackup/mydg2 mydg2 Commit the restoration of the configuration of the mydg disk group from the backup files in the directory /dgbackup/mydg: vxconfigrestore -c -l /dgbackup/mydg mydg FILES
/etc/vx/cbr/bk/dgname.dgid/dgid.dginfo Default location of backup file for disk group information. /etc/vx/cbr/bk/dgname.dgid/dgid.diskinfo Default location of backup file for disk attributes. /etc/vx/cbr/bk/dgname.dgid/dgid.binconfig Default location of backup file for binary configuration copy. /etc/vx/cbr/bk/dgname.dgid/dgid.cfgrec Default location of backup file for configuration records in vxprint -m format. NOTES
A disk group must be restored on the same physical disks as are defined in the configuration backup files. The disk group configuration backup and restore utilities do not save any data in the public region. This includes file system or other application data that is configured within VxVM objects. A shared disk group in a cluster is restored as a private disk group. After the commit phase has completed, you can deport the private disk group and re-import it as a shared disk group. SEE ALSO
vxconfigbackup(1M), vxconfigbackupd(1M) VxVM 5.0.31.1 24 Mar 2008 vxconfigrestore(1M)
All times are GMT -4. The time now is 09:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy