Red Hat / Fedora :: Change File Names To Remove Invalid Character

Apr 1, 2009

I am trying to copy a large number of files from a Linux server to a Windows file share. Unfortunately, all of the files and folders I have to copy have 10 numbers followed by 2 colons "::" in the name (example: 1234567890::WordDoc.doc) which of course is invalid in windows naming conventions. So now I'm trying to come up with a way to change the file and folder names on the fly to replace the colons with a dash "-" or space " ". I'm even willing delete the frist 12 characters in necessary. I have tried cp, mv, tr, and several -bash scripts but get no positive results.

View 4 Replies


ADVERTISEMENT

Fedora :: Col: Invalid Or Incomplete Multibyte Or Wide Character

Dec 10, 2010

I make it a habit to review the logwatch reports regularly. I have been seeing this one from Anacron lately. I'm not sure exactly when it started, but it has been going on for a while now and started after the F13 to F14 upgrade. I have searched and tried to find out what it means, but have come up empty. This is the report:

[Code]....

Is this something that is just spurious and can be safely ignored? If this isn't, how do I go about fixing it?

View 6 Replies View Related

General :: Remove Abnormal Character DEL From A File Name?

Jul 22, 2011

I have got certain files which somehow contain abnormal character "Del" "0x7f" or 177 which represents Del. And this is causing SVN to reject these files and abruptly end the process. I need to remove those characters from the file names but am not able to. find or grep do not search the files. This is how the file looks like with ls or find code...

View 3 Replies View Related

General :: Remove Spaces From Many File Names Under Cygwin?

Nov 22, 2010

I'm hoping that someone can help me, I need to remove spaces (not replace with underscores) from several thousand files on a system with cygwin.
Can I do this from the shell using rename or mv somehow?

View 4 Replies View Related

General :: Change File Character Set?

Aug 9, 2010

I would like to know how I can change a file so it has the same character encoding as files saved as comma separated csv files from Microsoft Excel.

I have tried using iconv to do this. code...

View 5 Replies View Related

Ubuntu :: Remove All The Numbers And Dash That Precedes The File Names

Nov 28, 2010

I have thousands files in which there are numbers and a dash followed by file name (which are different from each other), but have the same suffix. I would like to remove all the numbers and dash that precedes the file names.

View 1 Replies View Related

Programming :: Sed To Change Character In Text File Only Once?

Sep 7, 2009

I have a script that looks like:

Code:

cat servers.txt
trivia:P:N
trivia:D:N
tucana:P:Y

[code]....

I want to be able to find the lines that matches my input and change the N to a Y, but only for the lines that matches the name and not any other N's My problem is the line does not always contain a P as it can be a D as well so my matching did not work. If my script issues the name $1=triva the lines will change to:

Code:

trivia:P:Y
trivia:D:Y

I have the following code so far but as you can see it does not change the D's

Code:

sed -i 's/trivia:P:Y/trivia:P:N/g' servers.txt

*** UPDATE ***

should I be using a method as follows? I am still stuck on the changing all instances though.

Code:

$1=server
sed -i 's/$server1:P:Y/$server:P:N/g' server.txt
sed -i 's/$server1:D:Y/$server:D:N/g' server.txt

View 7 Replies View Related

Programming :: Script To Remove Single Quote That Begin And End File Names?

Aug 13, 2010

Made the following bash script named trimsquote:

Code:
#!/bin/bash
IFS=$'

[code]...

View 6 Replies View Related

General :: Any Way To Change Actual File Names Using Amarok?

Jan 9, 2010

I use amarok 2 and I have a lot of files that are titled "Track #.mp3", in Amarok I have changed them to see as the real songs but the actual files are still the same. Is there a way to change the actual file names using amarok to match the tags I have inside of amarok? The reason why I'd want to do this:

1. If my home folder becomes corrupt I don't have to redo 100's of songs (I have a backup but none the less
2. If I ever decide to use another program or if I'm in W7 using Windows Media Player classic it'd be nice to have it recognize the correct files without having to double up on the tag editing

If this isn't possible I'm going to wishlist it because I think it's functional and having a bunch of Track# files is a pain but impossible to get around when you have a lot of mix cd's.

View 2 Replies View Related

General :: How To Change Same File Names Directory Wise

Apr 9, 2010

I have a problem with file names changes. I have a hundred of file with same names and different subdirectories. I want to change that file names by their subdirectery names.

Currently is:
file name------------------------subdirectory name
1_km_16_days_EVI_s2_01200_01200.img --> MOD13A2.A2000049.h23v03.005.dir
1_km_16_days_EVI_s2_01200_01200.img --> MOD13A2.A2000065.h23v03.005.dir
1_km_16_days_EVI_s2_01200_01200.img --> MOD13A2.A2000081.h23v03.005.dir
...

I want to
MOD13A2.A2000049.h23v03.005.img
MOD13A2.A2000065.h23v03.005.img
MOD13A2.A2000081.h23v03.005.img

View 3 Replies View Related

General :: Use Script To Batch Change File Names In Folder

Nov 9, 2009

I would like to change file names in two ways

1)
1.jpg -> 0001.jpg
2.jpg -> 0002.jpg
...
x.jpg -> 000x.jpg
...
xy.jpg -> 00xy.jpg

2)
5201.jpg -> 5001.jpg
5202.jpg -> 5002.jpg
...
5xyz.jpg -> 5(x-2)yz.jpg (where x >= 2)

View 3 Replies View Related

General :: How To Change Invalid File System's Name

Apr 10, 2011

when I got following some information using fdisk -l,there were some invalid information about system name.I installed file system reiserfs, xfs on sdb6, sdb7.but the system didn't recognizes disk's file system name.

View 1 Replies View Related

OpenSUSE :: Get A Script Or App That Go Through The Samba Share Recursively And Change All File Names?

Apr 5, 2011

I have a samba share that was previously hosted by and accessed by Windows operating systems. As a result the filenames of all the files are not very command-line/linux friendly. I need to get a script or app that can go through the samba share recursively and change all file names to lowercase and replace spaces in the names with a ".", "_" or something.

View 9 Replies View Related

Debian Configuration :: Invalid Character In Revision ?

Sep 10, 2010

When i upgrade my packages with aptitude in testing, I am starting to get this error.

Also I get this from cron now and then.

View 6 Replies View Related

Server :: Option -m: Invalid Argument Near Character 14

Nov 26, 2010

Option -m: Invalid argument near character 14

View 1 Replies View Related

Programming :: Script To Remove Lines In A File With More Than "x" Instances Of Any Character ?

Oct 4, 2010

I'm looking for a script (bash, python, perl etc) or even a one liner (sed, awk etc) that can take a set of files and remove any line that has more than "x" instances of any character (case sensitive). I have been doing a lot of searching and can only come up with examples of how to remove blank lines, lines that start with a certain character or lines that contain a certain string. This will be used on a system running a Kubuntu derivative.

As a very poor and basic example, I would like to take files that contain lines like:

Code:

And end up with the files only containing the lines:

Code:

If I tell the script that 2 is the maximun number of times any character can appear in any line.

I know this must be possible, but for the life of me I cannot find even an example that will lead me in the right direction or better yet a piece of code I can use.

View 15 Replies View Related

Fedora :: Change XFCE4 Character Encoding?

Jun 28, 2009

I am experiencing some difficulties accessing some of my drives which have folders/files whose names include special characters. That problem has appeared just now, in Fedora 11, and just in XFCE4 (it somehow got stuck with the English default). In neither GNOME nor KDE happens.

The problem is not narrowed down to Thunar because even the terminal fails to recognize the special characters in XFCE4.

I guess that is simply solved by editing some configuration file, but I can't seem to find it.

What do I need to do to allow XFCE4 recognize special characters?

EDIT: It's definitely XFCE4, because if I open Thunar or xterm from GNOME, they recognize special-characters-filenames very well.

View 12 Replies View Related

Fedora :: Change Character Encoding In Either 12 Or PCBSD?

Feb 10, 2010

I have two machines in a local network and want to share files among them. Since I don't want to bother configuring NFS right now I am using ssh and scp to transfer files among them. There is a little problem though: the machines have different *nixes. One machine has Fedora 12 (Spanish) and the other one has PCBSD 7.1.1 (English).The problem is that both machines have different character encoding and while the Fedora machine can perfectly handle names with special characters, the BSD machine can't and in fact upon doing ssh to the Fedora machine filenames (with special characters) appear wrong and prove difficult to work with.

View 2 Replies View Related

General :: Invalid Or Incomplete Multibyte Or Wide Character?

May 13, 2011

I'm trying to backup an ext3-formatted disk to an external USB disk, also formatted in ext3.rsync repeatedly reports those kind of errors : rsync: recv_generator: failed to stat "<filename>" : Invalid or incomplete multibyte or wide character.Following Google, this is usually related to NTFS-formatted drives but it is not the case here.A lead to the solution could be that the folders and files being backuped are mapped through smbd. My smbd.conf file contains the following lines regarding charsets : #Dos charset = 850#Unix charset = ISO8859-1Since those lines are commented out, I believe this defaults to UTF-8.

View 6 Replies View Related

Software :: RHEL5 - ACL Mount (Invalid Argument Near Character 1)

Mar 12, 2010

I am using rhel5. I am trying to implement acl's I created one partition mounted on directory /aclmount
Created 3 users and group sales
Created one file under mounted dir quotation
I tried this command
#sudo /usr/bin/setfacl -m -u:user1:rw- aclmount/quotation
I am getting this out put
setfacl: Option -m: Invalid argument near character 1

View 5 Replies View Related

Ubuntu Installation :: DPKG - Invalid Character In Version Number

Oct 29, 2010

# sudo dpkg -i vasre-se-1.1.1~Debian_5-i386.deb dpkg: error processing vasre-se-1.1.1~Debian_5-i386.deb (--install):
parse error, in file '/var/lib/dpkg/tmp.ci/control' near line 2 package 'vasre-se':
error in Version string '1.1.1~Debian_5': invalid character in version number
Errors were encountered while processing:
vasre-se-1.1.1~Debian_5-i386.deb

I did install same package ok in 10.4 but now after I upgrade to 10.10 I am getting this error. I have already tried:
# sudo dpkg --clear-avail
# sudo aptitude update
# sudo aptitude upgrade

View 1 Replies View Related

Ubuntu :: Ibm_lotus_notes_fixpack-8.5.2.i586.deb : Invalid Character In Revision Number

May 4, 2011

Impossible to install the Lotus Notes 8.5.2 FP2

Code:

View 1 Replies View Related

Fedora X86/64bit :: Remove / Install Package Via Yum - Invalid Mode

Jun 2, 2011

Since the Fedoraplus site is down, I alternatively downloaded the FC14 version in hopes that it would work. Instead, I now receive the following error any time I try to remove or install a package via yum:
Code:
[Errno 22] invalid mode ('w') or filename: '//var/lib/yum/rpmdb-indexes/conflicts.tmp'
I'm pretty sure the issue here is a typo in a file (the extra "/" in the path to "conflicts.tmp").

View 4 Replies View Related

Fedora Networking :: Change Network Interfaces Names?

Dec 11, 2009

I found problem in FC 12 release. I installed fc 12 to server (earlier there was FC 7). Then as always i realised that names of interfaces (eth0, eth1, eth2 .... eth9) changed after install. eth0 became eth9, eth1 became eth5 ... Earlier on previous fedora releases i solved this problem correcting HWADDR in ifcfg-eth files, so i linked MAC addresses to names (eth0, eth1, eth2) as i wanted in a right order. Now I can't do this. After correcting these files and restarting network sevice i constantly get a message: device ... has different mac than expected. I looked ifup-eth file and compare it with the same one in fedora 7. And i found that in fedora 7 there is function rename_device which processes if HWADDR value doen't coincide with real mac address value. See code:

# remap, if the device is bound with a MAC address and not the right device num
# bail out, if the MAC does not fit
if [ -n "${HWADDR}" ]; then
FOUNDMACADDR=`get_hwaddr ${REALDEVICE}`
if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then
curdev=`get_device_by_hwaddr ${HWADDR}`
if [ -n "$curdev" ]; then
rename_device "${REALDEVICE}" "${HWADDR}" "${curdev}" || {
echo $"Device ${DEVICE} has different MAC address than expected, ignoring."
[Code].....

But in fc 12 release there is no function rename_device!!!!!!!!! So in this case if HWADDR value is not the same as FOUNDMACADDR value (which equal to REALDEVICE mac address) i just get an error message So I can't change interfaces names, as result i can't organize right order of network interfaces as it was earlier on fc7.

View 1 Replies View Related

Red Hat / Fedora :: FSType NTFS Not Supported - Change Media Names?

Jul 2, 2009

I just installed a fresh copy of Fedora 11 on my old win server 2003 machine. I have 2 x 250gig drives on this machine that are not the system drives. Fedora automounts them when I double click on them which is fine, but I would like them to automount as the system starts up and eventually make them available automatically to all other computers on the network. I was wondering how I could change the name of the 2 drives without wiping them.

One never had a name on my 2003 server so when it mounts it's name is something like this: A6CC5216CC51E0DB. Is there a way for me to change these? I tried using the Palimpsest Disk Utility, but it always gives me an error : "fstype ntfs not supported" , So is there a way to change the label name even if it's ntfs? If not, can I easily convert to another filesystem without losing the data on the drives? Also when this is done, I assume I have to make an entry in the fstab to automount, is this correct?

View 9 Replies View Related

Programming :: Getting Error 'couldn't Compile Regular Expression Pattern: Invalid Character Range'

Nov 19, 2008

I'm having a bit of trouble with a regular expression I'm trying to write and I'm not sure if it's something Tcl specific or my lack of regexp understanding.

[Code]...

I get a number of strings passed to a proc in the format 3|x where x is a number, either 0 or within the range 5-12. My understanding is that that regexp will match the literal '3' followed by a '|', the escapes the special meaning of |, and then 0 or, because of |, a number within the range 5-12. However I'm getting the error 'couldn't compile regular expression pattern: invalid character range'.

View 3 Replies View Related

General :: Use The Man / Info / Apropos Pages - Character Instructed The Shell To Interpret A Special Character As An Ordinary Character?

Mar 27, 2010

1.What character instructd the shell to interpret a special character as an ordinary character?

2.What directory contains some of the utilities available on the system in the form of binary files?

3. What command is used to search the location of a utility?

4. What command is used to instruct the editor to write the file and quit the editor?

5. What key quits the more utility and displays the shell prompt?

6. What command starts a child shell as the super user, taking on root's identity and environment?

7. Which wildcard characters can be used for searching all the files in the system that start with "A"?

8. The user name or login name of the super user is????

[Code]....

View 10 Replies View Related

Fedora :: Grep A File For Each '#' Character And Utf-8

Aug 15, 2010

I want to grep a a file for each '#' character that starts a line, the thing is the file is utf-8 and it starts with some some characters 'ef bb bf' is there a way to have grep to work with utf-8 files ?

[Code]....

View 2 Replies View Related

Programming :: How To Remove The Last Character

Jun 27, 2010

I have a string like this "/home/test/filename.txt" and i want to delete all character after the last "/". how to do that using sed or awk.

View 5 Replies View Related

Programming :: Remove First And Last Character?

Feb 24, 2010

which is the simplest way to have first and last character cropped out from a string? Something simpler than

Code:

echo $STRING | cut -b 2- | rev | cut -b 2- | rev

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved