09-08-2012
The unquoted whitespace in the filename is interpreted by the shell as a field separator. mv sees more than two arguments and expects the last one to be a directory.
Regards and welcome to the forum,
Alister
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a file where some records have been updated the wrong way and need to fix it quickly since the amount can be alot.
Every record where any of the first 4 characters are in upper case need to be changed to lowercase.
Records can have '#' in position-1 for comments. These musn't be... (2 Replies)
Discussion started by: Browser_ice
2 Replies
2. UNIX for Advanced & Expert Users
Hi Friends
I tried to find the file type of a file on my linux machine by using the following command
file xy.txt
instead of getting the file type i got following message
file: couldnot found any magic files!
What is wrong on this
how can i find the file type?
Regards
Shekar (2 Replies)
Discussion started by: kingskar
2 Replies
3. Programming
how we can replace char with a string
example
char *a="a.s"
so finally
what i ant to do
raplace a with ant and s sree
so in my array a i want to store the value as "ant.sree"
thank u in advance (1 Reply)
Discussion started by: phani_sree
1 Replies
4. Shell Programming and Scripting
So a script is working properly (tested many times) , then you add a new fine piece of code ,finaly its fails generally with a syntax error at the last line of the script.
:confused:... does anybody why this happens?
>uname -a
HP-UX test... (4 Replies)
Discussion started by: Klashxx
4 Replies
5. UNIX for Dummies Questions & Answers
I am trying to create files with special characters in its filenames for testing purposes. This is on a Linux RHEL4 but this should also be applicable on a Unix shell.
I am able to create files with special characters in the filenames...e.g.
cp -pv foo.gif \*special.gif
cp -pv foo.gif \... (6 Replies)
Discussion started by: sqa777
6 Replies
6. Shell Programming and Scripting
Hi all,
I am trying to find the best way of making a change to 1 char in a string, the string can be between 1 and 14 characters.
I am reading a line in from a file which contains
012341231231:2:102939283:NNN: Require :NBN:
012838238232:3:372932:NNN: Require :NNB:
I need to change 1 N or a... (8 Replies)
Discussion started by: nkwilliams
8 Replies
7. Shell Programming and Scripting
Hi
I'm looking for a way to read a text file that may contain 1000 records or more and each of these records has 460 characters. I need to read each record, and add a string of characters starting at position 256 for each record. Any suggestions using UNIX shell scripting. (4 Replies)
Discussion started by: macastor
4 Replies
8. UNIX for Dummies Questions & Answers
Hi
I've a string . And i need to replace set of characters with a single character
Means .. or . or ... and so on should be replaced with single % character
Irrespective of number of dots in between the characters , those should be replaced with single %
All the above strings should be... (3 Replies)
Discussion started by: smile689
3 Replies
9. UNIX for Dummies Questions & Answers
Hi guys!
I have quite a lot of files like
all_10001_ct1212307460308.alf*
and I want to get rid of the first number for all at once like:
all_ct1212307460308.alf*
How can I do this in the shell? (12 Replies)
Discussion started by: TimmyTiz
12 Replies
10. UNIX for Beginners Questions & Answers
Hello All,
I have a file as below . I want to convert the Y with numbers to H
From
4,
M11,
P2521759,
Y75,Y70,Y105,Y110,Y700,Y815,Y830,Y900,Y162,Y300,
Y291,Y290,Y15,Y20,
MR2716014,MR2617014,
Yesterday,current
1,201012,
102032,1
11112,0
to
4,
M11,
P2521759,... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies
LEARN ABOUT NETBSD
badsect
BADSECT(8) BSD System Manager's Manual BADSECT(8)
NAME
badsect -- create files to contain bad sectors
SYNOPSIS
badsect bbdir sector ...
DESCRIPTION
badsect makes a file to contain a bad sector. Normally, bad sectors are made inaccessible by the standard formatter, which provides a for-
warding table for bad sectors to the driver; see bad144(8) for details. If a driver supports the bad blocking standard it is much preferable
to use that method to isolate bad blocks, since the bad block forwarding makes the pack appear perfect, and such packs can then be copied
with dd(1). The technique used by this program is also less general than bad block forwarding, as badsect can't make amends for bad blocks
in the i-list of file systems or in swap areas.
On some disks, adding a sector which is suddenly bad to the bad sector table currently requires the running of the standard DEC formatter.
Thus to deal with a newly bad block or on disks where the drivers do not support the bad-blocking standard badsect may be used to good
effect.
badsect is used on a quiet file system in the following way: First mount the file system, and change to its root directory. Make a directory
BAD there. Run badsect giving as argument the BAD directory followed by all the bad sectors you wish to add. The sector numbers must be
relative to the beginning of the file system, but this is not hard as the system reports relative sector numbers in its console error mes-
sages. Then change back to the root directory, unmount the file system and run fsck(8) on the file system. The bad sectors should show up
in two files or in the bad sector files and the free list. Have fsck(8) remove files containing the offending bad sectors, but do not have
it remove the BAD/nnnnn files. This will leave the bad sectors in only the BAD files.
badsect works by giving the specified sector numbers in a mknod(2) system call, creating an illegal file whose first block address is the
block containing bad sector and whose name is the bad sector number. When it is discovered by fsck(8) it will ask ``HOLD BAD BLOCK ?'' A
positive response will cause fsck(8) to convert the inode to a regular file containing the bad block.
DIAGNOSTICS
badsect refuses to attach a block that resides in a critical area or is out of range of the file system. A warning is issued if the block is
already in use.
SEE ALSO
bad144(8), fsck(8)
HISTORY
The badsect command appeared in 4.1BSD.
BUGS
If more than one of the sectors in a file system fragment are bad, you should specify only one of them to badsect, as the blocks in the bad
sector files actually cover all the sectors in a file system fragment.
BSD
June 5, 1993 BSD