Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Delete files according to attributes Post 302557119 by lost.identity on Tuesday 20th of September 2011 12:05:48 PM
Old 09-20-2011
Thanks for the replies.

This is the output from jim mcnamara's code
Code:
./inp10: ASCII English text
./nc.m: ASCII text
./DILAT2.DAT: ASCII text, with very long lines
./DILAT.BIN: data
./interpolate: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), not stripped
./interp.o: ELF 64-bit LSB relocatable, x86-64, version 1 (GNU/Linux), not stripped
./restrt.bin: empty
./interp.f: FORTRAN program

One of the files I want to delete is the file 'interpolate' above. The other files also must have the same type. How do I delete these files?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

when I try to run rm on multiple files I have problem to delete files with space

Hello when I try to run rm on multiple files I have problem to delete files with space. I have this command : find . -name "*.cmd" | xargs \rm -f it doing the work fine but when it comes across files with spaces like : "my foo file.cmd" it refuse to delete it why? (1 Reply)
Discussion started by: umen
1 Replies

2. Shell Programming and Scripting

file attributes

How to retrieve file attributes in a sh/bash script (modification time, access time, size, etc.)? (1 Reply)
Discussion started by: Hitori
1 Replies

3. UNIX for Dummies Questions & Answers

Problems with any ls attributes

I got a server (test server) that hangs anytime we run a ls attribute like ls -ltr or ls -al. We can run ls | more command with no problem. But getting back to the ls attribute problem, it just sits and hangs, I did a ps -ef | grep ls, and a user had 15 sessions of ls -al running, I killed those,... (3 Replies)
Discussion started by: Sarccastik Dude
3 Replies

4. Shell Programming and Scripting

Delete all files if another files in the same directory has a matching occurence of a specific word

Hello, I have several files in a specific directory. A specific string in one file can occur in another files. If this string is in other files. Then all the files in which this string occured should be deleted and only 1 file should remain with the string. Example. file1 ShortName "Blue... (2 Replies)
Discussion started by: premier_de
2 Replies

5. Shell Programming and Scripting

How can i delete html attributes from tag ?

Input: <table class="pixelBorderTable faqTable" width="100%" border="1" cellpadding="3" cellspacing="0"> <tbody><tr> <td class="pixelBorderTableHeaderTd" valign="top" width="20%" bgcolor="#666666"><p>&nbsp;</p></td> <td class="pixelBorderTableHeaderTd" valign="top"... (1 Reply)
Discussion started by: cola
1 Replies

6. UNIX for Advanced & Expert Users

Help with can't get execution attributes

Hi Gurus, I am trying to create a FS using SVM but system is throwing the following error. newfs /dev/md/rdsk/d1002 newfs: construct a new file system /dev/md/rdsk/d1002: (y/n)? y /usr/sbin/clri: can't get execution attributes (1 Reply)
Discussion started by: rama krishna
1 Replies

7. Shell Programming and Scripting

Need help creating a script to FTP files to a server and then delete the files that were transfered.

I am trying to FTP files to a Windows server through my Linux machine. I have setup the file transfer with no problems but am having problem deleting those files from the Linux box. My current non-working solution is below. Any ideas, anyone?? :wall: Please be gentle, I'm fairly new to this... (4 Replies)
Discussion started by: jmalfhs
4 Replies

8. UNIX for Dummies Questions & Answers

Concatenate files and delete source files. Also have to add a comment.

- Concatenate files and delete source files. Also have to add a comment. - I need to concatenate 3 files which have the same characters in the beginning and have to remove those files and add a comment and the end. Example: cat REJ_FILE_ABC.txt REJ_FILE_XYZ.txt REJ_FILE_PQR.txt >... (0 Replies)
Discussion started by: eskay
0 Replies

9. Shell Programming and Scripting

Delete all files if another files in the same directory has a matching occurrence of a specific word

he following are the files available in my directory RSK_123_20141113_031500.txt RSK_123_20141113_081500.txt RSK_126_20141113_041500.txt RSK_126_20141113_081800.txt RSK_128_20141113_091600.txt Here, "RSK" is file prefix and 123 is a code name and rest is just timestamp of the file when its... (7 Replies)
Discussion started by: kridhick
7 Replies

10. Shell Programming and Scripting

Script needed to delete to the list of files in a directory based on last created & delete them

Hi My directory structure is as below. dir1, dir2, dir3 I have the list of files to be deleted in the below path as below. /staging/retain_for_2years/Cleanup/log $ ls -lrt total 0 drwxr-xr-x 2 nobody nobody 256 Mar 01 16:15 01-MAR-2015_SPDBS2 drwxr-xr-x 2 root ... (2 Replies)
Discussion started by: prasadn
2 Replies
elfwrap(1)							   User Commands							elfwrap(1)

NAME
elfwrap - wrap data in an ELF file SYNOPSIS
elfwrap [-64] [-o relobj-file] [-z target=sparc | x86] data-file... DESCRIPTION
The elfwrap utility creates an ELF relocatable object file from one or more data files. The relocatable object encapsulates each data file within an individual section, together with symbols that can be used to reference the section. The relocatable object is appropriate for inclusion with a subsequent link-edit. Users can reference the encapsulated data using the associated symbols. By default, a 32-bit ELF relocatable object is created that is appropriate for the machine on which elfwrap is executed. The -64 option can be used to create a 64-bit ELF relocatable object. The -z target option can be used to create a relocatable object for a specific machine type. Note - Any data encapsulated with elfwrap must be in a format appropriate for the destination target. By default, the relocatable object a.wrap.o is created. The -o option can be used to specify an alternative relocatable object name. The basename(1) of each data file is used to create various pieces of ELF information. For example, if the input data file is ISV/isv- data, the following ELF information is created within the relocatable object. An ELF section named .isv-data This section contains the entire contents of the input data file. An ELF symbol named isv-data_start This symbol reflects the starting address of the .isv-data section. An ELF symbol named isv-data_end This symbol reflects the address of the first location after the .isv-data section. OPTIONS
The following options are supported: -64 Create a 64-bit ELF relocatable object. -o relobj-file Produce a relocatable object that is named relobj-file. -z target=sparc | x86 Specifies the machine type for the output relocatable object. Supported targets are sparc and x86. The 32-bit machine type for the specified target is used unless the -64 option is also present, in which case the corresponding 64-bit machine type is used. By default, the relocatable object that is generated is 32-bit for the machine one which elfwrap is executed. EXAMPLES
The following example encapsulates the system passwd file and the system group file within a relocatable object passgroup.o. example% elfwrap -o passgroup.o /etc/passwd /etc/group example% elfdump -s passgroup.o | egrep "passwd|group" [2] 0x00000000 0x00000000 SECT LOCL D 0 .passwd [3] 0x00000000 0x00000000 SECT LOCL D 0 .group [7] 0x00000000 0x000002f0 OBJT GLOB D 0 .passwd passwd_start [8] 0x000002f0 0x00000000 OBJT GLOB D 0 .passwd passwd_end [9] 0x00000000 0x00000121 OBJT GLOB D 0 .group group_start [10] 0x00000121 0x00000000 OBJT GLOB D 0 .group group_end example% strings -N.passwd passgroup.o | head -1 root:x:0:0:Super-User:/:/sbin/sh example% strings -N.group passgroup.o | head -1 root::0: This relocatable object can be referenced from the following user code. example% cat main.c #include <stdio.h> extern char passwd_start, passwd_end; void main() { char *pstart = &passwd_start, *pend = &passwd_end; char *str, *lstr; for (lstr = str = pstart; str < pend; str++) { if ((*str == '0) && (str != (pend - 1))) { (void) printf("%.*s", (++str - lstr), lstr); lstr = str; } } } example% cc -o main main.c passgroup.o example% ./main root:x:0:0:Super-User:/:/sbin/sh .... nobody4:x:65534:65534:SunOS 4.x NFS Anonymous Access User:/: FILES
a.wrap.o The default relocatable object file created. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWtoo | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ SEE ALSO
elfdump(1), ld(1), strings(1), elf(3ELF), attributes(5), ddi_modopen(9F) Linker and Libraries Guide SunOS 5.11 17 March 2008 elfwrap(1)
All times are GMT -4. The time now is 12:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy