Sponsored Content
Full Discussion: Trim file using filename
Top Forums UNIX for Dummies Questions & Answers Trim file using filename Post 302771954 by keysoon on Friday 22nd of February 2013 09:29:53 AM
Old 02-22-2013
Trim file using filename

I want to remove first xx letters from filename_xx . How is that possible using linux. I have many files where xx could be same in many but filename is always unique. Thanks!
 

10 More Discussions You Might Find Interesting

1. AIX

trim file name extension????

Dear Chaps, What will I do if, I am not sure about the length of the file name, but only one thing that I want to remove only the last extension. e.g. abcdXXXXXX.pqrXXXXX.asc (X is any character) I want to trim only .asc (or,watever) so that resultant file name would be like... (1 Reply)
Discussion started by: vishal_ranjan
1 Replies

2. UNIX for Dummies Questions & Answers

trim file

Hi, I have a 6G log , which is unusual to read and I want to minimize it by removing some part on the upper portion( around 4GB). what should i do? can you please help me? thanks. (1 Reply)
Discussion started by: tungaw2004
1 Replies

3. Shell Programming and Scripting

trim spaces in a file

Hi, I'm new to shell programming. Need some help in the following requirement: I have a file origFile.txt with values: origFile.txt .00~ 145416.02~ xyz~ ram kishor .35~ 765.76~ anh reid~ kishna kerry Now each row in the file has value for 4 columns with "~" as... (7 Replies)
Discussion started by: badrimohanty
7 Replies

4. Shell Programming and Scripting

Trim pathname of the file

I am capturing the files in a directory to an array. I have 2 arrays with list of files in two different directories. Both the directories are supposed to have the same number of files and filenames. I want to check that the same file exists in both the directories. After I capture the... (1 Reply)
Discussion started by: Sangtha
1 Replies

5. Shell Programming and Scripting

Filename from splitting files to have the same filename of the original file with counter value

Hi all, I have a list of xml file. I need to split the files to a different files when see the <ko> tag. The list of filename are B20090908.1100-20090908.1200_CDMA=1,NO=2,SITE=3.xml B20090908.1200-20090908.1300_CDMA=1,NO=2,SITE=3.xml B20090908.1300-20090908.1400_CDMA=1,NO=2,SITE=3.xml ... (3 Replies)
Discussion started by: natalie23
3 Replies

6. Shell Programming and Scripting

right trim at end of file

Hi, I'have a file as below I need to replace the comma at the end of the file into ) as below Thanks (0 Replies)
Discussion started by: dvah
0 Replies

7. Shell Programming and Scripting

right trim at end of file

Hi, I'have a file as below I need to replace the comma at the end of the file into ) as below Thanks (1 Reply)
Discussion started by: dvah
1 Replies

8. Shell Programming and Scripting

Trim Filename

Hi All, I have a file named as FAB1_600015_CONRAD.A0_7XYZ12345.000_LT-SWET.01_LTPA25L_20110622-161429_07_WFR12345_20110622-161429_20110712-125228.data.dis I want to generate a directory taking only the 7XYZ12345.000_WFR12345 The length and format of the Filename will be the same... (2 Replies)
Discussion started by: asheshrocky
2 Replies

9. Shell Programming and Scripting

Trim a file columnwise

Hi All, I want to trim each columns leading & trailing (like sql trim function) of a ',' separated file.. I've a file like this.. manab , c gi lucky , home babu , maa I want the output as manab,c gi lucky,home babu,maa A one liner would be a great help. (2 Replies)
Discussion started by: manab86
2 Replies

10. UNIX for Dummies Questions & Answers

How to trim the file names?

How do i get the following output, irrespective of how many . 's i will have the file name. Input: FCBTexas_2013_12_31_16_V2.5_Masked.xml.filepart Output: FCBTexas_2013_12_31_16_V2.5_Masked.xml Thank you. (6 Replies)
Discussion started by: Ariean
6 Replies
UTMPDUMP(1)						       System Administration						       UTMPDUMP(1)

NAME
utmpdump - dump UTMP and WTMP files in raw format SYNOPSIS
utmpdump [-frh] [ filename ] DESCRIPTION
utmpdump is a simple program to dump UTMP and WTMP files in raw format, so they can be examined. utmpdump eads from stdin unless a file- name is passed. OPTIONS
-f, --follow Output appended data as the file grows. -r, --reverse Undump, write back edited login information into utmp or wtmp files. -h, --help Print a help text and exit. -V, --version Output version information and exit. NOTES
utmpdump can be useful in cases of corrupted utmp or wtmp entries. It can dump out utmp/wtmp to an ASCII file, then that file can be edited to remove bogus entries and reintegrated, using utmpdump -r < ascii_file > wtmp but be warned as utmpdump was written for debugging purpose only. BUGS
You may not use the option -r as the format for the utmp/wtmp files strongly depends on the input format. This tool was not written for normal use but for debugging. AUTHOR
Michael Krapp SEE ALSO
last(1), w(1), who(1), utmp(5) AVAILABILITY
The utmpdump command is part of the util-linux package and is available from Linux Kernel Archive <ftp://ftp.kernel.org/pub/linux/utils /util-linux/>. util-linux July 2012 UTMPDUMP(1)
All times are GMT -4. The time now is 07:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy