Sponsored Content
Full Discussion: Listing files with full path
Top Forums UNIX for Dummies Questions & Answers Listing files with full path Post 302129972 by congo on Thursday 2nd of August 2007 03:59:44 PM
Old 08-02-2007
Quote:
Originally Posted by r_sethu

Is it possible to get the files ordered by Last modified date in the same pattern?

If you can use
Code:
ls -ltR yourpathandpipes

instead of `find` that might make you happy. You can then awk print the filename and append the sed pwd. Or run from another location onto the catalogue where files are placed, then ls should return fullpath.

Do you need hardcode examples ?
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

list all files with full path of the file

How can i list every single file on a sun solaris server running 2.8 starting from '/' with the full path included in it? example. / ... ... ... /etc/inetd.conf /etc/passwd /etc/shadow ... ... ... /var/adm/messages /var/adm/messages.0 /var/adm/messages.1 ... ... ...... (4 Replies)
Discussion started by: Sowser
4 Replies

2. Shell Programming and Scripting

List files with full path

Hi all, How to save file full name to a file. I tried the following but don't know to include path name. $ ls -l | awk '{print $9}' > outputfile.dat $ cat outputfile.dat fifth.txt first.txt fourth.txt second.txt third.txt My wanted result is ie: ... (3 Replies)
Discussion started by: mr_bold
3 Replies

3. Red Hat

ls command to give full path to files

How can i perform a ls or other command to list the full paths of files from a ls? Looked through the man page for ls, no luck $ cd /tmp/ $ ls -l total 6 drwx------ 2 root root 4096 Nov 7 2008 keyring-7b5rMv drwx------ 2 bcr bcr 4096 Dec 7 2007 keyring-cGhir8 $ I'd be looking for... (1 Reply)
Discussion started by: brendan76
1 Replies

4. Shell Programming and Scripting

Help with listing given files in a given directory path

hello every one, i'm a novice in the field of Linux, so please help me out with this problem. a text file with the following syntax is given: file1 file2 file3 file4 file5 a script is to be written to list all d file names and tar the files with the filename... (3 Replies)
Discussion started by: Amruthesh C
3 Replies

5. Windows & DOS: Issues & Discussions

DOS Dir - listing of full path and timestamp

Hi, (Apologies, I'm sure I'm not the first person to raise this question but so far in my searches haven't found a good answer). I would like to output a listing per line of filename (including full path) and 'last updated' timestamp. e.g: Z:\dir1\file1.txt 01/02/2010 10:43... (5 Replies)
Discussion started by: GM_AIX
5 Replies

6. Shell Programming and Scripting

How to extract strings from full path when full path is not fixed

/Path/snowbird9/nrfCompMgrRave1230100920.log.gz:09/20/2010 06:14:51 ERROR Error Message. /Path/snowbird6/nrfCompMgrRave1220100920.log.gz:09/20/2010 06:14:51 ERROR Error Message. /Path/snowbird14/nrfCompMgrRave920100920.log.gz:09/20/2010 06:14:51 ERROR Error Message.... (0 Replies)
Discussion started by: Shirisha
0 Replies

7. Shell Programming and Scripting

listing the files without cd to the path

Hi all, I want to check the list of all directories and links in a particular directory and here, i have the list of the directories/links which i need to print on screen. I used the below command to check the dir/links, cd path1 ; ls -ltd `cat dir_links_list` But here, i don't want to... (3 Replies)
Discussion started by: raghu.iv85
3 Replies

8. Shell Programming and Scripting

How to list all Subdirectories and files with its full path in a parent directory?

How to list all Subdirectories and files with its full path in a parent directory? (1 Reply)
Discussion started by: johnveslin
1 Replies

9. Shell Programming and Scripting

Find and replace the path value in files, pattern is not full known.

Hi, I need to do find and replace, but the pattern is not full known. for example, my file has /proj/app-d1/sun or /data/site-d1/conf here app-d1 and site-d1 is not constant. It may be different in different files. common part is /proj/xx/sun and /data/xxx/conf i want to find where ever... (6 Replies)
Discussion started by: rbalaj16
6 Replies

10. UNIX for Beginners Questions & Answers

30 days old files with full path

my requirement is 30 days old files along with size and pull path of the file (file should be listed in descending by size). output: 12345 /app/testing/file1 12341 /app/testing/file2 (5 Replies)
Discussion started by: Rajesh123
5 Replies
MIB2C(1)							     Net-SNMP								  MIB2C(1)

NAME
mib2c -- generate template code for extending the agent SYNOPSIS
mib2c [-h] -c CONFIGFILE [-I PATH] [-f OUTNAME] [-i][-s][-q][-S VAR=VAL] MIBNODE DESCRIPTION
The mib2c tool is designed to take a portion of the MIB tree (as defined by a MIB file) and generate the template C code necessary to implement the relevant management objects within it. In order to implement a new MIB module, three files are necessary: - MIB definition file - C header file - C implementation file. The mib2c tool uses the MIB definition file to produce the two C code files. Thus, mib2c generates a template that you can edit to add logic necessary to obtain information from the operating system or application to complete the module. MIBNODE is the top level mib node you want to generate code for. You must give mib2c a mib node (e.g. ifTable) on the command line, not a mib file. This is the single most common mistake. The mib2c tool accepts both SMIv1 and SMIv2 MIBs. mib2c needs to be able to find and load a MIB file in order to generate C code for the MIB. To enable mib2c to find the MIB file, set the MIBS environment variable to include the MIB file you are using. An example of setting this environment variable is: MIBS=+NET-SNMP-TUTORIAL-MIB or MIBS=ALL The first example ensures that mib2c finds the NET-SNMP-TUTORIAL-MIB mib, in addition to the default MIB modules. The default list of MIB modules is set when the suite is first configured and built and basically corresponds to the list of modules that the agent supports. The second example ensures that mib2c finds all MIBs in the search location for MIB files. The default search location for MIB files is /usr/share/snmp/mibs. This search location can be modified by the MIBDIRS environment variable. Both the MIB files to be loaded and the MIB file search location can also be configured in the snmp.conf file. Please see snmp.conf(5) for more information. The generated *.c and *.h files will be created in the current working directory. OPTIONS
-h Display a help message. -c CONFIGFILE Use CONFIGFILE when generating code. These files will be searched for first in the current directory and then in the /usr/share directory (which is where the default mib2c configuration files can be found). Running mib2c without the -c CONFIGFILE option will display a description of the valid values for CONFIGFILE, that is, the available config files, including new ones that you might author. For example, % mib2c ifTable will display a description of the currently available values for CONFIGFILE. The following values are supported for CONFIGFILE: mib2c.mfd.conf mib2c.scalar.conf mib2c.int_watch.conf mib2c.iterate.conf mib2c.create-dataset.conf mib2c.array-user.conf mib2c.column_defines.conf mib2c.column_enums.conf GENERATING CODE FOR SCALAR OBJECTS: If you're writing code for some scalars, run: mib2c -c mib2c.scalar.conf MIBNODE If you want to magically "tie" integer variables to integer scalars, use: mib2c -c mib2c.int_watch.conf MIBNODE GENERATING CODE FOR TABLES: The recommended configuration file for tables is the MIBs for Dummies, or MFD, configuration file. It hides as much of the SNMP details as possible, generating small, easy to understand functions. It is also the most flexible and well documented configuration file. See the agent/mibgroup/if-mib/ifTable/ifTable*.c files for an example: mib2c -c mib2c.mfd.conf MIBNODE If your table data is kept somewhere else (e.g. it's in the kernel and not in the memory of the agent itself) and you need to "iter- ate" over it to find the right data for the SNMP row being accessed. See the agent/mibgroup/mibII/vacm_context.c file for an exam- ple: mib2c -c mib2c.iterate.conf MIBNODE If your table data is kept in the agent (i.e. it's not located in an external source) and is purely data driven (i.e. you do not need to perform any work when a set occurs). See the agent/mibgroup/examples/data_set.c file for an example of such a table: mib2c -c mib2c.create-dataset.conf MIBNODE If your table data is kept in the agent (i.e. it's not located in an external source), and you can keep your data sorted by the ta- ble index but you do need to perform work when a set occurs: mib2c -c mib2c.array-user.conf MIBNODE GENERATING HEADER FILE DEFINITIONS To generate just a header with a define for each column number in your table: mib2c -c mib2c.column_defines.conf MIBNODE To generate just a header with a define for each enum for any column containing enums: mib2c -c mib2c.column_enums.conf MIBNODE GENERATING CODE FOR THE 4.X LINE OF CODE (THE OLDER API) mib2c -c mib2c.old-api.conf MIBNODE -IPATH Search for configuration files in PATH. Multiple paths can be specified using multiple -I switches or by using one with a comma separated list of paths in it. -f OUTNAME Places the output code into OUTNAME.c and OUTNAME.h. Normally, mib2c will place the output code into files which correspond to the table names it is generating code for, which is probably what you want anyway. -i Do not run indent on the resulting code. -s Do not look for MIBNODE.sed and run sed on the resulting code. This is useful to shorten long mib variable names in the code. -q Run in "quiet" mode, which minimizes the status messages mib2c generates. -SVAR=VAL Preset a variable VAR, in the mib2c.*.conf file, to the value VAL. None of the existing mib2c configuration files (mib2c.*.conf) currently makes use of this feature, however, so this option should be considered available only for future use. EXAMPLES
The following generates C template code for the header and implementation files to implement UCD-DEMO-MIB::ucdDemoPublic. % mib2c -c mib2c.scalar.conf ucdDemoPublic writing to ucdDemoPublic.h writing to ucdDemoPublic.c running indent on ucdDemoPublic.h running indent on ucdDemoPublic.c The resulting ucdDemoPublic.c and ucdDemoPublic.h files are generated the current working directory. The following generates C template code for the header and implementation files for the module to implement TCP-MIB::tcpConnTable. % mib2c -c mib2c.iterate.conf tcpConnTable writing to tcpConnTable.h writing to tcpConnTable.c running indent on tcpConnTable.h running indent on tcpConnTable.c The resulting tcpConnTable.c and tcpConnTable.h files are generated in the current working directory. SEE ALSO
snmpcmd(1), snmp.conf(5) V5.6 05 Apr 2010 MIB2C(1)
All times are GMT -4. The time now is 08:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy