Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 06-04-2008, 12:59 AM   #1
Registered: Mar 2008
Posts: 69

Rep: Reputation: 15
Question File cannot be changed or moved

Hi guys,

I was doing a random check on 1 of my folder. i did a ls...and found that i have 2 files with the same name but different attributes(the date and the filesize is different)

What i did is rename to SinCashflowReport.sh2. so i only have 1 SinCashflowReport left. i tried to do a "more" but it says that " No such file or directory"

-rwxrwxr-x 1 kplus kplus 374 Apr 11 2007
-rwxrwxr-x 1 kplus kplus 3539 Jun 6 2006 SinCashflowReport.sh2

Any ideas guys?
Old 06-04-2008, 02:19 AM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
My guess is that the filename contains a non-printable character and it just appeared that the filenames where the same.

A common technique for dealing with duplicate filenames or weird filenames is to list them using "ls -i" to list the filenames with their inodes. Then use the find command to select the particular file with the inode you indicate, and use "-exec" or "-execdir" to process the file.
find . -maxdepth 1 -inum 12345 -okdir rm -f '{}' \;
See the find info manual and search for "inum" for more information.

Also check if their are file attributes or file acls that can cause problems for you.

Last edited by jschiwal; 06-04-2008 at 02:20 AM.


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
Finding a Moved File: Fedora Core 3 mcupples Linux - Server 6 03-30-2007 02:57 PM
A copied file != a moved file Caesar Tjalbo Linux - Newbie 4 11-09-2006 07:05 AM
I changed a file now I can't log in trappleye Linux - General 3 07-17-2006 01:50 PM
mv is producing an warning for every moved file raees Linux - Software 2 05-10-2005 01:30 PM
file rights changed? monc Linux - Networking 3 11-19-2003 09:20 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:35 AM.

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