Sponsored Content
Full Discussion: list files
Top Forums UNIX for Dummies Questions & Answers list files Post 75597 by avadhani on Tuesday 21st of June 2005 01:27:35 AM
Old 06-21-2005
list files

Hi ,
I want to list all files like *.C , *.h *.cpp in directory and subdirectory.
Take this each file (only file name should be taken) and pass it as argument to other unix command.
how do it sinlge command line.

Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

counting a list of string in a list of txt files

Hi there! I have 150 txt files named chunk1, chunk2, ........., chunk150. I have a second file called string.txt with more than 1000 unique strings, house, dog, cat ... I want to know which command I should use to count how many times each string appears in the 150 files. I have tried... (4 Replies)
Discussion started by: Pep Puigvert
4 Replies

2. Shell Programming and Scripting

I need a script to find socials in files and output a list of those files

I am trying to find socail security numbers in files in (and under) a specific directory and output a list of the files where they are found... the format would be with no dashes just 9 numeric characters in a row. I have tried this: find /DirToLookIn -exec grep '\{9\}' /dev/null {} \; >>... (1 Reply)
Discussion started by: NewSolarisAdmin
1 Replies

3. UNIX for Dummies Questions & Answers

Find files and display only directory list containing those files

I have a directory (and many sub dirs beneath) on AIX system, containing thousands of file. I'm looking to get a list of all directory containing "*.pdf" file. I know basic syntax of find command, but it gives me list of all pdf files, which numbers in thousands. All I need to know is, which... (4 Replies)
Discussion started by: r7p
4 Replies

4. Shell Programming and Scripting

find list of files from a list and copy to a directory

I will be very grateful if someone can help me with bash shell script that does the following: I have a list of filenames: A01_155716 A05_155780 A07_155812 A09_155844 A11_155876 that are kept in different sub directories within my current directory. I want to find these files and copy... (3 Replies)
Discussion started by: manishabh
3 Replies

5. Shell Programming and Scripting

how to copy files followed by list of names of all the files in /etc?

....... (2 Replies)
Discussion started by: pcbuilder
2 Replies

6. Shell Programming and Scripting

List files only when a certain number of files match

Hi, I have many files named CCR20110720011001.CTRD CCR20110720011501.CTRD CCR20110720012001.CTRD CCR20110720012501.CTRD CCR20110720021001.CTRD ... (9 Replies)
Discussion started by: shadyfright
9 Replies

7. Shell Programming and Scripting

Take a list if strings from a file and search them in a list of files and report them

I have a file 1.txt with the below contents. -----cat 1.txt----- 1234 5678 1256 1234 1247 ------------------- I have 3 more files in a folder -----ls -lrt------- A1.txt A2.txt A3.txt ------------------- The contents of those three files are similar format with different data values... (8 Replies)
Discussion started by: realspirituals
8 Replies

8. Shell Programming and Scripting

Copy list of files from a keyword list to another directory

Hello, I have a folder with a massive amount of files, and I want to copy out a specific subset of the files to a new directory. I would like to use a text file with the filenames listed, but can't get it to work. The thing I'm hung up on is that the folder names in the path can and do have... (5 Replies)
Discussion started by: twjolson
5 Replies

9. Shell Programming and Scripting

List all the files in the present path and Folders and subfolders files also

Hi, I need a script/command to list out all the files in current path and also the files in folder and subfolders. Ex: My files are like below $ ls -lrt total 8 -rw-r--r-- 1 abc users 419 May 25 10:27 abcd.xml drwxr-xr-x 3 abc users 4096 May 25 10:28 TEST $ Under TEST, there are... (2 Replies)
Discussion started by: divya bandipotu
2 Replies

10. UNIX for Beginners Questions & Answers

Comparing two files and list the difference with common first line content of both files

I have two file as given below which shows the ACL permissions of each file. I need to compare the source file with target file and list down the difference as specified below in required output. Can someone help me on this ? Source File ************* # file: /local/test_1 # owner: own #... (4 Replies)
Discussion started by: sarathy_a35
4 Replies
as(1)							      General Commands Manual							     as(1)

Name
       as - RISC assembler

Syntax
       as [ option ] ...  file

Description
       The  assembler,	as  ,  produces RISC object code in RISC extended coff format (the default) and binary assembly language. The as assembler
       does not run the loader.  It accepts the argument file which is a symbolic assembly language source program.  When assembled,  it  produces
       an object file.

       The  assembler,	as,  always defines the C preprocessor macros mips, host_mips, unix and LANGUAGE_ASSEMBLY to the C macro preprocessor.	It
       also defines SYSTYPE_BSD by default, but this changes if the -systype name option is specified (see the OPTIONS section).

Options
       The following options are available with as.  In addition, these options can be used with

       -g0	      Do not produce symbol table information for symbolic debugging.  This is the default.

       -g1	      Produce additional symbol table information for accurate but limited symbolic debugging of partially optimized code.

       -g or -g2      Produce additional symbol table information for full symbolic debugging and do not perform  optimizations  that  limit  full
		      symbolic debugging.

       -g3	      Produce  additional  symbol  table  information for full symbolic debugging for fully optimized code.  This option makes the
		      debugger inaccurate.

       -w	      Suppress warning messages.

       -P	      Run only the C macro preprocessor and place the result in a file.  If the source file has a suffix, change the suffix to .i.
		      If  the  source  file  does  not have a suffix, an .i is added to the source file name.  The .i file does not contain number
		      lines (#). This sets the -cpp option.

       -E	      Run only the C macro preprocessor on the file and send the result to the standard output.  This sets the -cpp option.

       -o output      Name the final output file output.  If this option is used, the a.out file is not affected.

       -Dname=def
       -Dname	      Define the name to the C macro preprocessor, as if by #define. If definition is not given, the name is defined as 1.

       -Uname	      Remove any initial definition of name.

       -Idir	      Search for #include files whose names do not begin with slash (/) in the directory of the file argument, then in directories
		      specified in -I options, and finally in the standard directory (/usr/include).

       -I	      Do not search for #include files in the standard directory (/usr/include).

       -G num	      Specify  the  maximum  size,  in	bytes, of a data item that is to be accessed from the global pointer.  The num argument is
		      interpreted as a decimal number.	If num is zero, data is not accessed from the global pointer.  The default value  for  num
		      is 8 bytes.

       -v	      Print  the passes as they execute with their arguments, input files, and output files.  Also prints resource usage in the C-
		      shell time format.

       -V	      Print the version of the driver and the versions of all passes.  This is performed with the command.

       -cpp	      Run the C macro preprocessor on assembly source files before compiling.  This is the default for

       -nocpp	      Do not run the C macro preprocessor on assembly source files before compiling.

       Either object file target byte ordering can be produced by as.  The default target byte ordering matches the machine where the assembler is
       running.   The  options	-EB  and  -EL  specify	the target byte ordering (big-endian and little-endian, respectively).	The assembler also
       defines a C preprocessor macro for the target byte ordering.  These C preprocessor macros are MIPSEB and MIPSEL for big-endian and  little-
       endian byte ordering respectively.

       -EB	      Produce object files targeted for big-endian byte ordering.  The C preprocessor macro MIPSEB is defined by the assembler.

       -EL	      Produce object files targeted for little-endian byte ordering.  The C preprocessor macro MIPSEL is defined by the assembler.

       The following option can only be used with the as command:

       -m	      Apply the M4 preprocessor to the source file before assembling it.

       The following option is primarily used to provide UNIX compilation environments other than the native compilation environment.

       -systype name  Use  the named compilation environment name.  See for the compilation environments that are supported and their names.  This
		      has the effect of changing the standard directory for #include files.  The new items are located in their  usual	paths  but
		      with  /name prepended to their paths.  Also a preprocessor macro of the form SYSTYPE_NAME (with name capitalized) is defined
		      in place of the default SYSTYPE_BSD.

       The options described below primarily aid compiler development and are not generally used:

       -Hc	      Halt compiling after the pass specified by the character c, producing an intermediate file for the next pass.  The c can	be
		      [  a ].  It selects the assembler pass in the same way as the -t option.	If this option is used, the symbol table file pro-
		      duced and used by the passes is the last component of the source file with the suffix changed to .T, or a .T is added if the
		      source file has no suffix. This file is not removed.

       -K	      Build  and use intermediate file names with the last component of the source file's  name replacing its suffix with the con-
		      ventional suffix for the type of file (for example, .G file for binary assembly language).  If the source file has no suffix
		      the  conventional  suffix  is  added  to	the source file name.  These intermediate files are never removed even when a pass
		      encounters a fatal error.

       -Wc[c...],arg1[,arg2...]
		      Pass the argument[s] argi to the compiler pass[es] c[c..].  The c's are one of [ pab ].  The c's selects the  compiler  pass
		      in the same way as the -t option.

       The options -t[hpab], -hpath, and -Bstring select a name to use for a particular pass.  These arguments are processed from left to right so
       their order is significant.  When the -B option is encountered, the selection of names takes place  using  the  last  -h  and  -t  options.
       Therefore, the -B option is always required when using -h or -t.  Sets of these options can be used to select any combination of names.

       -t[hpab]       Select  the  names.  The names selected are those designated by the characters following the -t option according to the fol-
		      lowing table:
		      Name     Character
		      include	   h  (see note below)
		      cpp	   p
		      as0	   a
		      as1	   b
		      If the character h is in the -t argument then a directory is added to the list of directories to be used	in  searching  for
		      #include	files.	 This  directory  name has the form COMP_TARGET_ROOT/usr/includestring .  This directory is to contain the
		      include files for the string release of the compiler.  The standard directory is still searched.

       -hpath	      Use path rather than the directory where the name is normally found.

       -Bstring       Append string to all names specified by the -t option.  If -t option has not been processed before the -B, the -t option	is
		      assumed to be ``hpab''.  This list designates all names.

       Invoking the assembler with a name of the form asstring has the same effect as using a -Bstring option on the command line.

       If the environment variable COMP_HOST_ROOT is set, the value is used as the root directory for all pass names rather than the default slash
       (/).  If the environment variable COMP_TARGET_ROOT is set, the value is used as the root directory for the includes rather than the default
       slash (/).

       If the environment variable ROOTDIR is set, the value is used as the root directory for all names rather than the default /usr/.  This also
       affects the standard directory for #include files, /usr/include .

       If the environment variable TMPDIR is set, the value is used as the directory to place any temporary files rather than the default /tmp/.

       Other arguments are ignored.

Files
       file.o	      object file

       a.out	      assembler output

       /tmp/ctm?      temporary

       /usr/lib/cpp   C macro preprocessor

       /usr/lib/as0   symbolic to binary assembly language translator

       /usr/lib/as1   binary assembly language assembler and reorganizer

       /usr/include   standard directory for #include files

See Also
       cc(1), as(1), what(1)

								       RISC								     as(1)
All times are GMT -4. The time now is 10:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy