Duplicate directory in same partition help.


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Duplicate directory in same partition help.
# 8  
Old 10-22-2009
What I meant was asking you to post the output of the command 'ls -lb', without any find or xargs, issued from the directory where these "duplicate" directories reside. Because if it's not a filesystem problem, but just a naming problem (because of non-printing special characters) that's the easiest way to detect them.
# 9  
Old 10-22-2009
Quote:
Originally Posted by pludi
What I meant was asking you to post the output of the command 'ls -lb', without any find or xargs, issued from the directory where these "duplicate" directories reside. Because if it's not a filesystem problem, but just a naming problem (because of non-printing special characters) that's the easiest way to detect them.

Oh yes you are right about the hidden character. Here is the output of the command by the way:

Code:
[root]# ls -lb

drwxrwxr-t  34 root       sappy 4096 Oct 10 16:17 public_html
drwxrwxrwx   2 sappy www         4096 May 26 11:37 public_html\

There is "\" on the end of one of them.

Regards,

Last edited by maiku09; 10-23-2009 at 02:12 PM..
# 10  
Old 10-22-2009
Then it's probably just an appended space. Try
Code:
cd "public_html "

You can check this by running 'ls -lbQ', which will additionally quote the entry, to see how many spaces are appended.

---------- Post updated at 15:29 ---------- Previous update was at 15:25 ----------

Example output for future reference:
Code:
-rw-r--r-- 1 pludi users 0 22. Okt 15:27 test.file     # regular file
-rw-r--r-- 1 pludi users 0 22. Okt 15:27 test.file\    # with 1 space appended
-rw-r--r-- 1 pludi users 0 22. Okt 15:27 test.file\ \  # with 2 spaces appended
-rw-r--r-- 1 pludi users 0 22. Okt 15:27 test.file\377 # with ASCII char 255 (0xFF) appended
-rw-r--r-- 1 pludi users 0 22. Okt 15:27 test.file\t   # with tab appended
-rw-r--r-- 1 pludi users 0 22. Okt 15:27 test.file\r   # with carriage return appended

# 11  
Old 10-22-2009
Quote:
Originally Posted by pludi
Then it's probably just an appended space. Try
Code:
cd "public_html "

You can check this by running 'ls -lbQ', which will additionally quote the entry, to see how many spaces are appended.

Pludi,

Thank you for your support! That did the trick, I was able to cd into the directory.
But still curious of it its impossible to cd by specifying inode.

Thank for your help,

Best Regards,
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

Shrink LVM partition & create new Linux Primary partition

Hello All, I have a Red Hat Linux 5.9 Server installed with one hard disk & 2 Partitions created on it as follows, /boot - Linux Partition & another is LVM - One VG & under that 5-6 Logical volumes(var,opt,home etc). Here my requirement is to take out 1GB of space from LVM ( Any logical... (5 Replies)
Discussion started by: gr8_usk
5 Replies

2. UNIX for Dummies Questions & Answers

Duplicate home directory

Hi, I'm running a RHEL6 machine on a VMWare platform and I have somehow created a duplicate /home directory. See below. # pwd /home/home/twood # ls Desktop Documents Downloads Music Pictures Public Templates Videos # I am currently working on some disk quota procedures and I... (2 Replies)
Discussion started by: tjwops
2 Replies

3. UNIX for Dummies Questions & Answers

How to scrub directory only if on own partition/drive?

Hi all, I've been working on a script to run a disk wipe (using Jim Garlick's scrub tool) on the filesystem in Xerox production printer RIPs. Easy enough if there's just one partition, but I need to cater for the possibility of multiple drives/partitions, and either ZFS or UFS (don't know if... (2 Replies)
Discussion started by: DavidDawesFXA
2 Replies

4. Solaris

Partition overlaps another partition while creating new parition in solaris

hi all while formatting hard disk i am getting following error. Partition 1 ends at 266338338 It must be between 34 and 143374704. label error: EFI Labels do not support overlapping partitions Partition 8 overlaps partition 1. Warning: error writing EFI. Label failed. I have formatted the... (2 Replies)
Discussion started by: nikhil kasar
2 Replies

5. Shell Programming and Scripting

Remove duplicate files in same directory

Hi all. Am doing continuous backup of mailboxes using rsync. So whenever a new mail arrives it is automatically copied on backup server. When a new mail arrives it is named as xyz:2, when it is read by the email client an S is appended xyz:2,S Eventually , 2 copies of the same file exist on... (7 Replies)
Discussion started by: coolatt
7 Replies

6. UNIX for Dummies Questions & Answers

Delete duplicate files from one of two directory structures

Hello everyone, I have been struggling to clean up a back-up mess I created when manually duplicating a directory structure and then working in both of them.. The structures now are significantly different and contain in the order of 15 k files of which most are duplicates. Now I am trying to... (0 Replies)
Discussion started by: procreator
0 Replies

7. Shell Programming and Scripting

script that detects duplicate files in directory

I need help with a script which accepts one argument and goes through all the files under a directory and prints a list of possible duplicate files As its output, it prints zero or more lines, each one containing a space-separated list of filenames. All the files listed on one line have the same... (1 Reply)
Discussion started by: trueman82
1 Replies

8. UNIX for Dummies Questions & Answers

I've created a partition with GNU Parted, how do I mount the partition?

I've created a partition with GNU Parted, how do I mount the partition? The manual information at http://www.gnu.org/software/parted/manual/parted.html is good, but I am sure about how I mount the partition afterwards. Thanks, --Todd (1 Reply)
Discussion started by: jtp51
1 Replies

9. Shell Programming and Scripting

remove duplicate files in a directory

Hi ppl. I have to check for duplicate files in a directory . the directory has following files /the/folder /containing/the/file a1.yyyymmddhhmmss a1.yyyyMMddhhmmss b1.yyyymmddhhmmss b2.yyyymmddhhmmss c.yyyymmddhhmmss d.yyyymmddhhmmss d.yyyymmddhhmmss where the date time stamp can be... (1 Reply)
Discussion started by: asinha63
1 Replies
Login or Register to Ask a Question