LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-22-2008, 10:19 AM   #1
PlatinumX
Member
 
Registered: May 2008
Location: France
Distribution: Debian / Fedora / Gentoo
Posts: 178

Rep: Reputation: 15
Question Ununderstood file name


Hi all,

I have downloaded a file on the net.
I needed to replace it somewhere else, but I discover that common shell commands are not able to handle the file.
This is due to its name it seems.

Here is an extract of the command:
Code:
$ file RMLL.nuFW.authentication(CamRiP)(part1).avi
RMLL.nuFW.authentication(CamRiP): ERROR: cannot open `RMLL.nuFW.authentication\(CamRiP\)' (No such file or directory)
Code:
$ file "RMLL.nuFW.authentication(CamRiP)(part1).avi"
RMLL.nuFW.authentication(CamRiP): ERROR: cannot open `RMLL.nuFW.authentication\(CamRiP\)' (No such file or directory)
I tried to change the name of the file in a simpler one, however:
Code:
$mv file RMLL.nuFW.authentication(CamRiP)(part1).avi movie.avi
RMLL.nuFW.authentication(CamRiP): ERROR: cannot open `RMLL.nuFW.authentication\(CamRiP\)' (No such file or directory)
What should I type in my shell to be able to rename the file ?

Thanks
 
Old 08-22-2008, 10:34 AM   #2
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Try mv ./file_name new_file_name

Of course, if there is a space between the closing and the opening brace ) (, then that is the real problem and using the ./ won't help. If it is, remove it. You can also escape it by typing a backslash after the closing brace and then using tab completion.

Last edited by jay73; 08-22-2008 at 10:37 AM.
 
Old 08-22-2008, 11:05 AM   #3
PlatinumX
Member
 
Registered: May 2008
Location: France
Distribution: Debian / Fedora / Gentoo
Posts: 178

Original Poster
Rep: Reputation: 15
Code:
Try mv ./file_name new_file_name
It was not working.

I added more \ to escape charcater:
I did:
Code:
$mv file RMLL.nuFW.authentication\(CamRiP\)\(part1\).avi movie.avi
instead of
Code:
$mv file RMLL.nuFW.authentication(CamRiP)(part1).avi movie.avi
and it worked !

Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Display by File Name, File Size, and File Owner using ls akeenabawa Linux - Newbie 9 08-15-2008 03:21 PM
How can read from file.txt C++ where can save this file(file.txt) to start reading sam_22 Programming 1 01-11-2007 06:11 PM
file /usr/bin/mysqlbug from install of mysql-3.23.58-1.9 conflicts with file from pac commandline Linux - Software 2 09-28-2006 06:55 PM
gave wrong syntax for tar as tar -cvzf file file.tgz how to recover the file gautham Linux - General 4 04-13-2005 04:15 AM
How to play a media file/ video file/mp3 file recorded in harddisk/cd-rom arindam Linux - Newbie 2 09-05-2003 11:31 AM


All times are GMT -5. The time now is 05:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration