Home Man
Search
Today's Posts
Register

If you're not sure where to post a Unix or Linux question, post it here. All unix and Linux beginners welcome in this forum!

File and Directory same name

Tags
solved

Login to Reply

 
Thread Tools Search this Thread
# 8  
Old 12-20-2017
The inode number is in the 1st column.
Code:
find . \! -name . -prune -inum 151855 -exec echo rm {} \;

# 9  
Old 12-20-2017
Hi,

Please execute find command as below.

Code:
find . -inum 151855 -print

# 10  
Old 12-21-2017
Given what you have shown us with the ls -lib, the following command should work:
Code:
rm reports*s

# 11  
Old 12-21-2017
reportss should not collide with reports.
# 12  
Old 12-21-2017
Hi Folks,

This would just seem to me that there is a backspace embedded in the file name.

Code:
e415243 on BUILD cathsunvs02 # od -c
reportys^?^?s
reports
0000000   r   e   p   o   r   t   y   s 177 177   s  \n   r   e   p   o
^Ce415243 on BUILD cathsunvs02 #

So most of the solutions above will work fine.

Regards

Gull04
# 13  
Old 12-21-2017
Code:
$ ls -lib
total 472
204826 drwxrwxr-x    2 ora102   lpsgrp          256 Apr 03 2009  executables
204827 drwxrwxr-x    2 ora102   lpsgrp        12288 Nov 13 14:31 forms
204828 drwxrwxr-x    2 ora102   lpsgrp        12288 Dec 21 15:18 reports
151855 -rwxr-xr-x    1 wtolenti lpsgrp       217088 Jul 09 2015  reports\177s
204829 drwxrwxr-x    2 ora102   lpsgrp          256 Apr 03 2009  scripts
204830 drwxrwxr-x    2 ora102   lpsgrp          256 Apr 03 2009  sql
$ find . -inum 151855 -print
./reports
$

---------- Post updated at 03:39 PM ---------- Previous update was at 03:37 PM ----------

thanks so much everyone it works

Code:
$ ls -altr reports*s
-rwxr-xr-x    1 wtolenti lpsgrp       217088 Jul 09 2015  reports
$ rm reports*s
$
$ ls -latr
total 56
drwxrwxr-x    2 ora102   lpsgrp          256 Apr 03 2009  sql
drwxrwxr-x    2 ora102   lpsgrp          256 Apr 03 2009  scripts
drwxrwxr-x    2 ora102   lpsgrp          256 Apr 03 2009  executables
drwxrwxr-x    8 ora102   lpsgrp          256 Apr 22 2009  ..
drwxrwxr-x    2 ora102   lpsgrp        12288 Nov 13 14:31 forms
drwxrwxr-x    2 ora102   lpsgrp        12288 Dec 21 15:18 reports
drwxrwxr-x    7 ora102   lpsgrp         4096 Dec 21 15:38 .
$

Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to find and get a file in an entire directory with an excluded directory specified? abdulbadii UNIX for Beginners Questions & Answers 2 03-22-2018 06:14 AM
Shell script cannot create directory and move the file to that directory digioleg54 Shell Programming and Scripting 9 04-12-2017 02:57 AM
Shell scripting-I need a script which should watch a directory for a file with specific directory akashdeepak Shell Programming and Scripting 8 08-26-2014 05:05 PM
Change to directory and search some file in that directory in single command saurau Shell Programming and Scripting 2 01-21-2013 07:53 AM
Grepping file names, comparing them to a directory of files, and moving them into a new directory sHockz Shell Programming and Scripting 1 02-02-2012 01:53 AM
Script which removes files from the first directory if there is a file in the second directory SLAMUL Shell Programming and Scripting 6 10-26-2011 08:12 PM
Move the latest or older File from one directory to another Directory pp_ayyanar Shell Programming and Scripting 1 03-24-2010 03:22 PM
File transfer from one directory to another directory in unix easterraj Shell Programming and Scripting 5 11-03-2009 01:40 AM
Move a file from windows directory to unix directory kingpeejay Shell Programming and Scripting 1 06-19-2009 01:31 PM
Copying one file at a time from one directory to another directory. Nikhilindurkar UNIX for Dummies Questions & Answers 1 09-01-2008 09:25 AM


All times are GMT -4. The time now is 01:59 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password