03-31-2002
situations like this would require the use of awk. I really dont think you can cut off some of the path. i really am not sure about that.
can you access the files after you tared them??? if you can, then dont worry about the long file names. all you have to do to access the files is type whatever command you want to type and the name of the files. (that is if you are in the same directory the files are in)
anyway, if you want to just get rid of every other thing but the pathnames of your file. try this command
get in the directory you xtracted the file into and type this
after typing whatever command you used to extract the files, then pipe it with this: awk '{print $2}'
example
tar xvf sowhat.tar | awk '{print $2}'
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm looking after part of an application which batches up files concatanates them together and then moves the concatanated files to another directory. The problem I have is that the box runs Windows 2003 and UNIX shell emulation is provided by MKS Toolkit, when 10,000 or more files arive in the... (1 Reply)
Discussion started by: pookie
1 Replies
2. Shell Programming and Scripting
Hi all.
I have a problem at work which I have managed to break down into a simple test scenario:
I have written a monitoring script that outputs every second the status of various processes, but for now, lets just print the date
input.sh:
while true
do
date
sleep 1
done
This... (9 Replies)
Discussion started by: spudtheimpaler
9 Replies
3. Shell Programming and Scripting
Hi I am going to migrate our datawarehouse system from HP Tru 64 Unix to the Red Hat Linux.
Inside the box, it is running around 40 cron jobs; inside each cron job, it is calling other shell script files, and the shell script files may again call other shell script files or ctl files(for... (1 Reply)
Discussion started by: franksubramania
1 Replies
4. UNIX for Dummies Questions & Answers
the sorting is based on name of file,
file size
modification time stamps o f file
it should dislay the output in the following format
"." and ".." enteries should be ignored
please give some idea how to do it (1 Reply)
Discussion started by: pappu kumar jha
1 Replies
5. Shell Programming and Scripting
Hi,
I am new to shell scripting.Please help me on this.I am using solaris 10 OS and shell i am using is
# echo $0
-sh
My requirement is i have source file say makefile.I need to extract files with extensions (.c |.cxx |.h |.hxx |.sc) from the makefile.after doing so i need to check whether... (13 Replies)
Discussion started by: muraliinfy04
13 Replies
6. Shell Programming and Scripting
Hi guys,
I need a little help learning to batch an awk script. All the examples I found on line are too complicated for me. Here's the awk command that I want to run on lots of files.
awk 'NR==FNR{a=$0;next$3 in a{print $0 a " " a}' inputfile_A_1.out inputfile_B_1.out > outputfile1.txt
... (11 Replies)
Discussion started by: atjurhs
11 Replies
7. Shell Programming and Scripting
I need a script file for backup (zip or tar or gz) of old log files in our unix server (causing the space problem). Could you please help me to create the zip or gz files for each log files in current directory and sub-directories also?
I found one command which is to create gz file for the... (4 Replies)
Discussion started by: Mallikgm
4 Replies
8. Shell Programming and Scripting
Hii,
Could someone help me to append string to the starting of all the filenames inside a directory but it should exclude .zip files and subdirectories.
Eg.
file1: test1.log
file2: test2.log
file3 test.zip
After running the script
file1: string_test1.log
file2: string_test2.log
file3:... (4 Replies)
Discussion started by: Ravi Kishore
4 Replies
9. Shell Programming and Scripting
Hi,
Very good wishes to all!
Please help to provide the shell script for generating the record counts in filed wise from the .csv file
My question:
Source file:
Field1 Field2 Field3
abc 12f sLm
1234 hjd 12d
Hyd 34
Chn
My target file should generate the .csv file with the... (14 Replies)
Discussion started by: Kirands
14 Replies
10. UNIX for Beginners Questions & Answers
i use the split command to split a one terabyte backup file into 10 chunks of 100 GB each. The files are split one after the other. While the files is being split, I will like to scp the files one after the other as soon as the previous one completes, from server A to Server B. Then on server B ,... (2 Replies)
Discussion started by: malaika
2 Replies
LEARN ABOUT CENTOS
utmpdump
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)