I have written a script to run ddrescue on a list of files.
My problem is that ddrescue does not like the filenames I am giving it. If the filename has spaces in it it says
but if it has no spaces I get
I have tried using "quotes" instead of \'ing every space, but no luck. If I replace the command 'ddrescue' with 'echo', run the script, and then manually copy the given filenames into ddrescue in another terminal it works fine. But this rather defeats the purpose..
I have only been learning scripting for a little while, so I feel like I must be missing something obvious, I just can't figure out what!
Hi
I am trouble parsing through a file with spaces in the filename. I need to grab "supportIDPS/SCM/windows_install/file groups/dds.fgl" and then do a md5sum on it. I am using sh.
Any help is appreciated.
Here is an example of the input file:
7eedbc9f7902bf4c1878d9e571addf9a ... (4 Replies)
Hi
I am having difficulty copying files from one dir to another due to a space in the names of the file with an extension .rtf
There are a group of files and the command am using is
cp `ls -rt /wlblive/home/whiops/ops/RTFs/*.rtf|head -20` /wlblive/home/jamshed
Since the files are... (3 Replies)
I have a text file containing files in a directory structure i.e.
/project/hr/raw/jcpdatav/datav_aug03
/project/hr/raw/jcpdatav/comb8121sep02n
/project/hr/raw/jcpdatav/datav_feb04_ons
/project/hr/raw/jcpdatav/corpsick_jun06
/project/hr/raw/jcpdatav/jcpjoiners200507... (3 Replies)
Hello,
I have a Folder (myfile) which contain the following files:
P$12789865KR +N+01+OM+16102009165416.nu
P$M1-508962GD +N+01+ALP+14102009094417.nu
Is there a sed command(s) that will loop through this folder
and remove the spaces that exists in the filename?
Any help would be... (7 Replies)
Hello all,
I am having difficulties writing an ftp script to retrieve a file via get using a variable name to pass the file name.
I know the name of the file I am going to retrieve, this file name has embedded spaces and punctuation in the name itself.
If I interactively use the get and I... (10 Replies)
Hello I canīt find an answer to my problem.
I am trying to tar some files with spaces
#!/bin/sh
files="/var/installer/server Config
/var/installer/client user
/var/installer/Svenskt Language
/var/installer/GUI user Plugin
/var/installer/Firefox Plugin"
tar -czvf /tmp/files.tar.gz... (14 Replies)
Hi;
In following code
find LOG_DIR -type f | while read filename; do echo $filename; done
I want to precede each white space encountered in filename with \ so that when i use $filename for running some commands in do...done,it wont give me an error.
will appreciate ur help in this.... (1 Reply)
Hi all,
I've been tangoing with this one for a couple of days now and I'm still not making any progress.
Basically I'm trying to match three numbers in a string from a text file with matching numbers in a jpeg, and then copying the results to another folder.
Data looks like this:
Model:... (4 Replies)
Hi team,
Here's a requirement for me.
Here are the list of files i have in a unix directory.
W 2 A D_2014.csv
W 3 A D_2014.csv
W 4 A D_2014.csv
/home/kmani00-> uname -a
AIX sliyyvxx 1 6 00F613E54C00
/home/kmani00->
The file names has to be without spaces as follows.
W2AD_2014.csv... (1 Reply)
The following command to replace text in place in multiple files in a directory is tripping up on filename spaces (Windows environment). I really don't know Perl.
find '\\server\directory' | xargs perl -pi -e 's/textA/textB/g'Mike (2 Replies)
Discussion started by: Michael Stora
2 Replies
LEARN ABOUT DEBIAN
ddrescue
DDRESCUE(1) User Commands DDRESCUE(1)NAME
ddrescue - data recovery tool
SYNOPSIS
ddrescue [options] infile outfile [logfile]
DESCRIPTION
GNU ddrescue - Data recovery tool. Copies data from one file or block device to another, trying hard to rescue data in case of read
errors.
You should use a logfile unless you know what you are doing.
OPTIONS -h, --help
display this help and exit
-V, --version
output version information and exit
-a, --min-read-rate=<bytes>
minimum read rate of good areas in bytes/s
-A, --try-again
mark non-split, non-trimmed blocks as non-tried
-b, --block-size=<bytes>
sector size of input device [default 512]
-B, --binary-prefixes
show binary multipliers in numbers [SI]
-c, --cluster-size=<sectors>
sectors to copy at a time [128]
-C, --complete-only
do not read new data beyond logfile limits
-d, --direct
use direct disc access for input file
-D, --synchronous
use synchronous writes for output file
-e, --max-errors=[+]<n>
maximum number of [new] error areas allowed
-E, --max-error-rate=<bytes>
maximum allowed rate of read errors per second
-f, --force
overwrite output device or partition
-F, --fill=<types>
fill given type blocks with infile data (?*/-+)
-g, --generate-logfile
generate approximate logfile from partial copy
-i, --input-position=<bytes>
starting position in input file [0]
-I, --verify-input-size
verify input file size with size in logfile
-K, --skip-size=<bytes>
initial size to skip on read error [64 KiB]
-m, --domain-logfile=<file>
restrict domain to finished blocks in file
-M, --retrim
mark all failed blocks as non-trimmed
-n, --no-split
do not try to split or retry failed blocks
-o, --output-position=<bytes>
starting position in output file [ipos]
-p, --preallocate
preallocate space on disc for output file
-q, --quiet
suppress all messages
-r, --max-retries=<n>
exit after given retries (-1=infinity) [0]
-R, --reverse
reverse direction of copy operations
-s, --max-size=<bytes>
maximum size of input data to be copied
-S, --sparse
use sparse writes for output file
-t, --truncate
truncate output file to zero size
-T, --timeout=<interval>
maximum time since last successful read
-v, --verbose
be verbose (a 2nd -v gives more)
-x, --extend-outfile=<bytes>
extend outfile size to be at least this long
Numbers may be followed by a multiplier: b = blocks, k = kB = 10^3 = 1000, Ki = KiB = 2^10 = 1024, M = 10^6, Mi = 2^20, G = 10^9, Gi =
2^30, etc... Time intervals have the format 1[.5][smhd] or 1/2[smhd].
REPORTING BUGS
Report bugs to bug-ddrescue@gnu.org
Ddrescue home page: http://www.gnu.org/software/ddrescue/ddrescue.html
General help using GNU software: http://www.gnu.org/gethelp
COPYRIGHT
Copyright (C) 2012 Antonio Diaz Diaz. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
The full documentation for ddrescue is maintained as a Texinfo manual. If the info and ddrescue programs are properly installed at your
site, the command
info ddrescue
should give you access to the complete manual.
ddrescue 1.16 June 2012 DDRESCUE(1)