02-23-2014
So, if you have a filename like <arabic string>-[YT-f23][Ht3aZLf9q_7].mp4, you want the entire filename to be turned into .mp4? Assuming this isn't what you want, please give us clear directions of the changes you want made to the filenames you're processing (similar to what I provided in message #4 in this thread with your new requirements added) and show us examples of what you do want to happen.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I'm stuck on this last part...am running a simple script under AIX to extract NetView host IP addresses. The line below returns the IP address in parenthesis with a trailing colon, i.e.
ping -c 1 $name |grep \( | awk '{ print $3 }' --------> returns
(a.b.c.d):
How can I only... (10 Replies)
Discussion started by: livinthedream
10 Replies
2. Shell Programming and Scripting
Hi ALL,
I'm new to this forum.
Thanks and congrats to all for their great efforts building this site simply superb for all unix administrators.
My requirement is to remove extensions of the files in the current directory. I'm doing it using below script which is working but i think it is... (12 Replies)
Discussion started by: prvnrk
12 Replies
3. Shell Programming and Scripting
hi:
i have several thousand files from users and of course they use all kind of characters on filenames. I have things like:
My special report (1999 ) Lisa & Jack's work.doc
crazy.
How do I remove all this characters in the current dir and subdirs too?
Thanks. (3 Replies)
Discussion started by: jason7
3 Replies
4. Shell Programming and Scripting
Hi all,
I have this basic script to remove, in this case 9 characters from the end of a file name. This is what I have so far,
for file in *.mov
do
newname=`echo $file | sed 's/\(.*\)........./\1/' `
mv "$file" "$newname"
done
The problem is that it removes the file extension as well.... (2 Replies)
Discussion started by: Monkey Dean
2 Replies
5. Shell Programming and Scripting
Hello,
I got files full path in a text file like that
/main/k/kdelibs/kdelibs4c2a_3.5.10.dfsg.1-2ubuntu7_i386.deb
/main/k/kdelibs-experimental/libknotificationitem-dev_4.3.2-0ubuntu1_i386.deb
/main/k/kdemultimedia/dragonplayer_4.3.2-0ubuntu1_i386.deb... (13 Replies)
Discussion started by: davidkhan
13 Replies
6. Shell Programming and Scripting
Hi,
I have some files with some extension e.g. abc.xml.REMOVE,xyz.xml,efg.xml.REMOVE .
I have to remove the .REMOVE extension. I can display it using the below script but cannot rename it.
ls -l|sed 's/\.REMOVE//'
How can I rename this?
Thanks in advance (7 Replies)
Discussion started by: babom
7 Replies
7. Shell Programming and Scripting
Hi, I need a bit of help.
I've used awk to get the first 7 characters of a file -
awk '{print substr($0,0,7)}' test.csv
How do I now take this variable to rename test.csv to variable.csv ?
Any help or advice would be greatly appreciated! (2 Replies)
Discussion started by: sianm
2 Replies
8. Shell Programming and Scripting
Hi all
i am new for the shell scripting can any one help me with my requirments . i want to delete file older than 21 days everything works fine but in that dir i got the files with should not be deleted with particular extension like (.info):confused:here is the script i wrote .can anyone... (5 Replies)
Discussion started by: vikatakavi
5 Replies
9. Shell Programming and Scripting
Hi All!
Please can someone help, I have a dir with the following files:
~-rw-r--r-- 1 emmuser users 2087361 Oct 16 15:50 MPGGSN02_20131007234519_24291.20131007
-rw-r--r-- 1 emmuser users 2086837 Oct 16 15:50 MPGGSN02_20131007233529_24272.20131007
-rw-r--r-- 1 emmuser ... (7 Replies)
Discussion started by: fretagi
7 Replies
10. Shell Programming and Scripting
Hello,
I am trying to print searched multiple keywords in multiple files.
It is almost okay with the code but the code puts filename in front of each line.
How may I get rid of it?
-grep -A1 'word1' *.txt | grep -A1 'word2' | grep -A1 'word3'
I expect:
Real outcome:
How may I... (3 Replies)
Discussion started by: baris35
3 Replies
LEARN ABOUT CENTOS
iowatcher
iowatcher(1) General Commands Manual iowatcher(1)
NAME
iowatcher - Create visualizations from blktrace results
SYNOPSIS
iowatcher OPTIONS...
DESCRIPTION
iowatcher graphs the results of a blktrace run. It can graph the result of an existing blktrace, start a new blktrace, or start a new blk-
trace and a benchmark run. It can then create an image or movie of the IO from a given trace. iowatcher can produce either SVG files or
movies in mp4 format (with ffmpeg) or ogg format (with png2theora).
OPTIONS
--help Print a brief usage summary.
-d, --device <device>
Controls which device you are tracing. You can only trace one device at a time for now. It is sent directly to blktrace, and only
needed when you are making a new trace.
-D, --blktrace-destination <destination>
Destination for blktrace.
-p, --prog <program>
Program to run while blktrace is run.
-K, --keep-movie-svgs
Keep the SVG files generated for movie mode.
-t, --trace <file|directory>
Controls the name of the blktrace file. iowatcher uses a dump from blkparse, so -t tries to guess the name of the corresponding per
CPU blktrace data files if the dump file doesn't already exist. If you want more than one trace in a given graph, you can specify
-t more than once. If a directory is specified, iowatcher will use the name of the directory as the base name of the dump file and
all trace files found inside the directory will be processed.
-l, --label <label>
Sets a label in the graph for a trace file. The labels are added in the same order the trace files are added.
-m, --movie [spindle|rect]
Create a movie. The file format depends on the extension used in the -o filename.* option. If you specify an .ogv or .ogg exten-
sion, the result will be Ogg Theora video, if png2theora is available. If you use an .mp4 extension, the result will be an mp4
video if ffmpeg is available. You can use any other extension, but the end result will be an mp4. You can use --movie=spindle or
--movie=rect, which changes the style of the IO mapping.
-T, --title <title>
Set a title to be placed at the top of the graph.
-o, --output <file>
Output filename (default: trace.svg).
-r, --rolling <seconds>
Control the duration for the rolling average. iowatcher tries to smooth out bumpy graphs by averaging the current second with sec-
onds from the past. Larger numbers here give you flatter graphs.
-h, --height <height>
Set the height of each graph
-w, --width <width>
Set the width of each graph
-c, --columns <columns>
Numbers of columns in graph output
-x, --xzoom <min:max>
Limit processed time range to min:max
-y, --yzoom <min:max>
Limit processed sectors to min:max
-a, --io-plot-action <action>
Plot given action (one of Q,D,C) in IO graph
-P, --per-process-io
Distinguish between processes in IO graph
-O, --only-graph <graph>
Add a single graph to the output (see GRAPHS). By default all the graphs are included, but with -O you get only the graphs you ask
for. -O may be used more than once.
-N, --no-graph <type>
Remove a single graph from the output (see GRAPHS). This may also be used more than once.
GRAPHS
Choices for -O and -N are:
io, tput, latency, queue_depth, iops, cpu-sys, cpu-io, cpu-irq, cpu-user, cpu-soft
EXAMPLES
Generate graph from the existing trace.dump:
iowatcher -t trace.dump -o trace.svg
Skip the IO graph:
iowatcher -t trace.dump -o trace.svg -N io
Only graph tput and latency:
iowatcher -t trace.dump -o trace.svg -O tput -O latency
Generate a graph from two runs, and label them:
iowatcher -t ext4.dump -t xfs.dump -l Ext4 -l XFS -o trace.svg
Run a fio benchmark and store the trace in trace.dump, add a title to the top, use /dev/sda for blktrace:
iowatcher -d /dev/sda -t trace.dump -T 'Fio Benchmark' -p 'fio some_job_file'
Make a movie from an existing trace:
iowatcher -t trace --movie -o trace.mp4
iowatcher(1)