Directory with same names and different inode no


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Directory with same names and different inode no
# 8  
Old 08-28-2012
yes, i agree with you.That's the first thing came into my mind Smilie,but i don't want to do that.That filesystem is used for hosting 7 zones and un-mounting will mean i need to have production downtime Smilie
# 9  
Old 08-28-2012
I partially understood your situation, so I donno if my answer could help you

Just cd into each dir and note down
Code:
pwd
df -h .

This info could lessen confusion

Thanks,
S.Satheesh
# 10  
Old 08-28-2012
Quote:
Originally Posted by sahil_shine
Hi,

Below is the out put i see when i give below command

root@us000xyz # ls -lia |grep us000xyz_R5|sed -n l

Code:
42734 drwxrwxrwx  35 root     other         37 Aug 25 19:38 us000x\
yz_R5
     89538 drwxr-xr-x   3 oracle   dba          512 Aug 25 19:20 us000x\
yz_R5

If I'm reading that correctly, the first entry has a tab or a bunch of spaces after a newline in the name (!?!?). Or your copy-paste went a bit wrong Smilie

My prefered method of getting to the bottom of weirdness like this is the cat-vet trick:
Code:
ls -li | grep us000xyz_R5 | cat -vet

That will show you any trailing spaces (the cause of 90% of these IME) and/or other oddnesses.
You can even leave off the -li but if you want even simpler output and don't need the inode num right now.

Then you can either attack the dir by name (suggest renaming it via mv first) or by inode number as listed above (find -inum)
This User Gave Thanks to Smiling Dragon For This Post:
# 11  
Old 08-29-2012
Thanks a lot all and especially (Smiling Dragon ) for your reply.It really helped me i can see the space in second one after R5.So i here is what i did to remove the contents first inside it.



Code:
root@us000xyz # ls -li |grep us000xyz_R5|cat -vet
       
     42734 drwxrwxrwx  35 root     other         37 Aug 25 19:38 us000xyz_R5$
     89538 drwxr-xr-x   3 oracle   dba          512 Aug 25 19:20 us000xyz_R5 $
root@us000xyz #

Code:
root@us000xyz # cd "us000xyz_R5 " --there is space here after R5
root@us000xyz # ls -lrt
total 2
drwxr-xr-x   3 oracle   dba          512 Aug 25 19:20 test
root@us000xyz # rm -r test

Below option could have also helped but i wanted to be absolutely sure to check contents by changing directory what i am deleting Smilie

Quote:
find . -inum ******
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Loop through directory names

Some guidance is highly appreciated. I have 10 directories with names ending with 'xyz', each of them have about 30000 files. I want to loop through the contents of each directory and produce a single output per directory. So I want to have 10 output files named 'directory_name'_out. With... (1 Reply)
Discussion started by: newbie83
1 Replies

2. Shell Programming and Scripting

changing multiple directory names

Hi guys, I have lots of files that look like: ABC.packed.dir DEF.packed.dir GHI.packed.dir etc... I would like them to have more of the usual naming convention ABC DEF GHI etc... so I was thinking that I could: (2 Replies)
Discussion started by: atjurhs
2 Replies

3. Shell Programming and Scripting

Grepping file names, comparing them to a directory of files, and moving them into a new directory

got it figured out :) (1 Reply)
Discussion started by: sHockz
1 Replies

4. UNIX for Dummies Questions & Answers

Loop through directory and extract sub directory names

I am trying to loop through folders and extract the name of the lowest level subfolder I was running the script below, it returns /bb/bin/prd/newyork /bb/bin/prd/london /bb/bin/prd/tokyo I really want newyork london tokyo I couldn't find a standard variable for the lowest level... (1 Reply)
Discussion started by: personalt
1 Replies

5. UNIX for Dummies Questions & Answers

How to display only Owner and directory/sub directory names under particular root

hai, I am new to Unix, I have a requirement to display owner name , directory or sub directory name, who's owner name is not equal to "oasitqtc". (here "oasitqtc" is the owner of the directory or sub directory.) i have a command (below) which will display all folders and sub folders, but i... (6 Replies)
Discussion started by: gagan4599
6 Replies

6. Shell Programming and Scripting

Searching for file names in a directory while ignoring certain file names

Sun Solaris Unix Question Haven't been able to find any solution for this situation. Let's just say the file names listed below exist in a directory. I want the find command to find all files in this directory but at the same time I want to eliminate certain file names or files with certain... (2 Replies)
Discussion started by: 2reperry
2 Replies

7. Shell Programming and Scripting

How to sort directory names and use only last?

I need help writing a bash script for the windows cygwin environment. I'm not sure if bash is the optimal tool. Perhaps perl would be better? Either would work. I have directories whose names include the date they were created. The directory names are in the format of... (0 Replies)
Discussion started by: siegfried
0 Replies

8. UNIX for Dummies Questions & Answers

Directory Inode Number Not Unique

Hi, I know that inode for each file is unique, but is it the for the directory? So far I found different directories has the same inode nubmer when you do ls -i, could some one explain why? Thanks a lot. (9 Replies)
Discussion started by: nj302
9 Replies

9. Shell Programming and Scripting

Directory names that contain spaces and other suggestions?

The script below was written to select files and convert a particular string to something other and replace that file. However, I came across some issues with filenames that contain spaces, any suggestions to get around this? Any other suggestions that may apply to this code would also be... (5 Replies)
Discussion started by: Shakey21
5 Replies

10. UNIX for Dummies Questions & Answers

Use of $ in directory names

I have a TAR (compressed) file that I uncompressed using the following command $ tar xvf uagent.tar It created a directory structure as follows <root>/arcagent/UAGENT/reloc/$UAGENT_HOME/ How do I access files under the $UAGENT_HOME? Every time I do change directory command, the OS... (3 Replies)
Discussion started by: pkappaz
3 Replies
Login or Register to Ask a Question