12-27-2013
Thanks for your replay
i want all spaces between words in file name to be -
like
thanks-for-replay
all my files now is .mp4
if you can also give me a solution if i have multiple files format that will be great
thanks
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
systemd-readahead-collect.service
SYSTEMD-READAHEAD-REPLAY.SERVICE(8) systemd-readahead-replay.service SYSTEMD-READAHEAD-REPLAY.SERVICE(8)
NAME
systemd-readahead-replay.service, systemd-readahead-collect.service, systemd-readahead-done.service, systemd-readahead-done.timer, systemd-
readahead - Disk read ahead logic
SYNOPSIS
systemd-readahead-replay.service
systemd-readahead-collect.service
systemd-readahead-done.service
systemd-readahead-done.timer
/usr/lib/systemd/systemd-readahead/systemd-readahead [OPTIONS...] COMMAND [DIRECTORY | FILE]
DESCRIPTION
systemd-readahead-collect.service is a service that collects disk usage patterns at boot time. systemd-readahead-replay.service is a
service that replays this access data collected at the subsequent boot. Since disks tend to be magnitudes slower than RAM, this is intended
to improve boot speeds by pre-loading early at boot all data on disk that is known to be read for the complete boot process.
systemd-readahead-done.service is executed a short while after boot completed and signals systemd-readahead-collect.service to end data
collection. On this signal, this service will then sort the collected disk accesses and store information about them in /.readahead.
Normally, both systemd-readahead-collect.service and systemd-readahead-replay.service are activated at boot so that access patterns from
the preceding boot are replayed and new data collected for the subsequent boot. However, on read-only media where the collected data cannot
be stored, it might be a good idea to disable systemd-readahead-collect.service.
On rotating media, when replaying disk accesses at early boot, systemd-readahead-replay.service will order read requests by their location
on disk. On non-rotating media, they will be ordered by their original access timestamp. If the file system supports it,
systemd-readahead-collect.service will also defragment and rearrange files on disk to optimize subsequent boot times.
OPTIONS
systemd-readahead understands the following options:
-h, --help
Prints a short help text and exits.
--max-files=
Maximum number of files to read ahead. Only valid for thes collect command.
--file-size-max=
Maximum size of files in bytes to read ahead. Only valid for the collect and replay commands.
--timeout=
Maximum time in microseconds to spend collecting data. Only valid for the collect command.
COMMANDS
The following commands are understood by systemd-readahead:
collect [DIRECTORY]
Collect read-ahead data on early boot. When terminating, it will write out a pack file to the indicated directory containing the
read-ahead data.
replay [DIRECTORY]
Perform read-ahead on the specified directory tree.
analyze [FILE]
Dumps the content of the read-ahead pack file to the terminal. For each file, the output lists approximately how much will be read
ahead by the replay command.
SEE ALSO
systemd(1)
systemd 208 SYSTEMD-READAHEAD-REPLAY.SERVICE(8)