Sponsored Content
Top Forums Shell Programming and Scripting Get a Numeric Permissions List for a Directory Tree??? Post 302922679 by LinQ on Monday 27th of October 2014 04:25:20 PM
Old 10-27-2014
@Aia:

Brevity is the soul of wit...

Thanks again Smilie
 

10 More Discussions You Might Find Interesting

1. Programming

Directory tree search???

Hi all, I've got a problem, what function do i use to list the contents of all the directory tree (simular to "find")? Any other suggestions? Thank you all (3 Replies)
Discussion started by: solvman
3 Replies

2. Filesystems, Disks and Memory

Space Used by Directory Tree

Can someone tell me how I can determine how much space (blocks) have been used by a given directory tree? I periodically need to know how much space is consumed by a directory and all of its files and subdirectories and their files in either KB or blocks. I have tried df and du but these do not... (1 Reply)
Discussion started by: johnk99
1 Replies

3. UNIX for Dummies Questions & Answers

ls and chmod numeric permissions

Hello, When I do a "ls -l" I can see my directories have drwxr-xr-xr. I am more used to the chmod numerical syntax like 755. Is there an easy way to list out the numerical permissions rather than rwx etc. (1 Reply)
Discussion started by: rondebbs
1 Replies

4. Programming

directory as tree

hi i have modified a program to display directory entries recursively in a tree like form i need an output with the following guidelines: the prog displays the contents of the directory the directory contents are sorted before printing so that directories come before regular files if an entry... (2 Replies)
Discussion started by: anything2
2 Replies

5. Shell Programming and Scripting

setup directory tree

All, I am new to Unix scripting ans was looking for some guidance. I basically have to: 1. Check if a directory exists - if not create it 2. Check the permissions of the dir - if Wrong change loop this. Sort of creating a directory tree. Thanks. (2 Replies)
Discussion started by: wicked24
2 Replies

6. Shell Programming and Scripting

directory tree

Hi all, The following is a script for displaying directory tree. D=${1:-`pwd`} (cd $D; pwd) find $D -type d -print | sort | sed -e "s,^$D,,"\ -e "/^$/d"\ -e "s,*/\(*\)$,\:-----\1,"\ -e "s,*/,: ,g" | more exit 0 I am trying to understand the above script.But... (3 Replies)
Discussion started by: ravi raj kumar
3 Replies

7. UNIX for Dummies Questions & Answers

Move all files in a directory tree to a signal directory?

Is this possible? Let me know If I need specify further on what I am trying to do- I just want to spare you the boring details of my personal file management. Thanks in advance- Brian- (2 Replies)
Discussion started by: briandanielz
2 Replies

8. Shell Programming and Scripting

creating a directory tree

Hi all, I'd like to create a directory tree, and define from stdin how many levels deep and how many directories in each level should be created. What I wrote does not work properly:#!/bin/bash #set -x read -p " What root directory? " rootDir && { /bin/rm -R $rootDir; mkdir $rootDir; } ||... (2 Replies)
Discussion started by: NBaH
2 Replies

9. UNIX for Dummies Questions & Answers

directory tree with directory size

find . -type d -print 2>/dev/null|awk '!/\.$/ {for (i=1;i<NF;i++){d=length($i);if ( d < 5 && i != 1 )d=5;printf("%"d"s","|")}print "---"$NF}' FS='/' Can someone explain how this works..?? How can i add directory size to be listed in the above command's output..?? (1 Reply)
Discussion started by: vikram3.r
1 Replies

10. Shell Programming and Scripting

Specific directory parsing in a directory tree

Hi friends, Hello again :) i got stuck in problem. Is there any way to get a special directory from directory tree? Here is my problm.." Suppose i have one fix directory structure "/abc/xyz/pqr/"(this will be fix).Under this directory structure i have some other directory and... (6 Replies)
Discussion started by: harpal singh
6 Replies
LWRES_PACKET(3) 						       BIND9							   LWRES_PACKET(3)

NAME
lwres_lwpacket_renderheader, lwres_lwpacket_parseheader - lightweight resolver packet handling functions SYNOPSIS
#include <lwres/lwpacket.h> lwres_result_t lwres_lwpacket_renderheader(lwres_buffer_t *b, lwres_lwpacket_t *pkt); lwres_result_t lwres_lwpacket_parseheader(lwres_buffer_t *b, lwres_lwpacket_t *pkt); DESCRIPTION
These functions rely on a struct lwres_lwpacket which is defined in lwres/lwpacket.h. typedef struct lwres_lwpacket lwres_lwpacket_t; struct lwres_lwpacket { lwres_uint32_t length; lwres_uint16_t version; lwres_uint16_t pktflags; lwres_uint32_t serial; lwres_uint32_t opcode; lwres_uint32_t result; lwres_uint32_t recvlength; lwres_uint16_t authtype; lwres_uint16_t authlength; }; The elements of this structure are: length the overall packet length, including the entire packet header. This field is filled in by the lwres_gabn_*() and lwres_gnba_*() calls. version the header format. There is currently only one format, LWRES_LWPACKETVERSION_0. This field is filled in by the lwres_gabn_*() and lwres_gnba_*() calls. pktflags library-defined flags for this packet: for instance whether the packet is a request or a reply. Flag values can be set, but not defined by the caller. This field is filled in by the application wit the exception of the LWRES_LWPACKETFLAG_RESPONSE bit, which is set by the library in the lwres_gabn_*() and lwres_gnba_*() calls. serial is set by the requestor and is returned in all replies. If two or more packets from the same source have the same serial number and are from the same source, they are assumed to be duplicates and the latter ones may be dropped. This field must be set by the application. opcode indicates the operation. Opcodes between 0x00000000 and 0x03ffffff are reserved for use by the lightweight resolver library. Opcodes between 0x04000000 and 0xffffffff are application defined. This field is filled in by the lwres_gabn_*() and lwres_gnba_*() calls. result is only valid for replies. Results between 0x04000000 and 0xffffffff are application defined. Results between 0x00000000 and 0x03ffffff are reserved for library use. This field is filled in by the lwres_gabn_*() and lwres_gnba_*() calls. recvlength is the maximum buffer size that the receiver can handle on requests and the size of the buffer needed to satisfy a request when the buffer is too large for replies. This field is supplied by the application. authtype defines the packet level authentication that is used. Authorisation types between 0x1000 and 0xffff are application defined and types between 0x0000 and 0x0fff are reserved for library use. Currently these are not used and must be zero. authlen gives the length of the authentication data. Since packet authentication is currently not used, this must be zero. The following opcodes are currently defined: NOOP Success is always returned and the packet contents are echoed. The lwres_noop_*() functions should be used for this type. GETADDRSBYNAME returns all known addresses for a given name. The lwres_gabn_*() functions should be used for this type. GETNAMEBYADDR return the hostname for the given address. The lwres_gnba_*() functions should be used for this type. lwres_lwpacket_renderheader() transfers the contents of lightweight resolver packet structure lwres_lwpacket_t *pkt in network byte order to the lightweight resolver buffer, *b. lwres_lwpacket_parseheader() performs the converse operation. It transfers data in network byte order from buffer *b to resolver packet *pkt. The contents of the buffer b should correspond to a lwres_lwpacket_t. RETURN VALUES
Successful calls to lwres_lwpacket_renderheader() and lwres_lwpacket_parseheader() return LWRES_R_SUCCESS. If there is insufficient space to copy data between the buffer *b and lightweight resolver packet *pkt both functions return LWRES_R_UNEXPECTEDEND. COPYRIGHT
Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") Copyright (C) 2000, 2001 Internet Software Consortium. BIND9 Jun 30, 2000 LWRES_PACKET(3)
All times are GMT -4. The time now is 05:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy