Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SOLVED - Unable to remove file
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
kdvgent
Guru
Guru


Joined: 29 Sep 2004
Posts: 352
Location: Belgium

PostPosted: Sat Aug 17, 2019 2:44 pm    Post subject: SOLVED - Unable to remove file Reply with quote

Quote:

mycomputer /home/karel/data/OvdP Gent II/2019-2020 Jean van der Donk/201909 # ls -al
total 1024
drwxr-xr-x 2 karel users 0 Aug 17 16:23 .
drwxr-xr-x 2 karel users 0 Aug 17 16:22 ..
-rwxr-xr-x 1 karel users 52186 Aug 15 12:03 'OvdP GentII 201909 Uitnodiging.odt'
mycomputer /home/karel/data/OvdP Gent II/2019-2020/201909 # rm 'OvdP GentII 201909 Uitnodiging.odt'
rm: cannot remove 'OvdP GentII 201909 Uitnodiging.odt': No such file or directory
mycomputer /home/karel/data/OvdP Gent II/2019-2020/201909 # rm -f 'OvdP GentII 201909 Uitnodiging.odt'
mycomputer /home/karel/data/OvdP Gent II/2019-2020/201909 # ls -al
total 1024
drwxr-xr-x 2 karel users 0 Aug 17 16:23 .
drwxr-xr-x 2 karel users 0 Aug 17 16:22 ..
-rwxr-xr-x 1 karel users 52186 Aug 15 12:03 'OvdP GentII 201909 Uitnodiging.odt'


The file cannot be opened by Libreoffice writer neither. LibreOffice gives the same error message (file does not exist).

Any suggestion how I can get rid of that file? On the internet, I find all kind of suggestions on how deleting files with strange characters in the name but that is not my case.

Many thanks in advance.


Last edited by kdvgent on Sat Aug 17, 2019 4:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
APolozov
Apprentice
Apprentice


Joined: 28 Sep 2006
Posts: 189
Location: Voronezh, Russia

PostPosted: Sat Aug 17, 2019 3:05 pm    Post subject: Reply with quote

You can try to use filemask to delete or rename this file, rm *201909*odt for example.
And may be you want check filesystem, because filename look as well
_________________
Excuse my bad English, I only study it.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5910

PostPosted: Sat Aug 17, 2019 3:15 pm    Post subject: Reply with quote

try this:
Code:
rm -rf OvdP\ GentII\ 201909\ Uitnodiging.odt

_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
kdvgent
Guru
Guru


Joined: 29 Sep 2004
Posts: 352
Location: Belgium

PostPosted: Sat Aug 17, 2019 3:25 pm    Post subject: No luck Reply with quote

Thanks for the suggestion but - no luck.

Quote:

karel@mycomputer ~/data/OvdP Gent II/2019-2020/201909 $ rm -rf 'OvdP GentII 201909 Uitnodiging.odt'
karel@mycomputer ~/data/OvdP Gent II/2019-2020/201909 $ ls -al
total 1024
drwxr-xr-x 2 karel users 0 Aug 17 16:23 .
drwxr-xr-x 2 karel users 0 Aug 17 16:22 ..
-rwxr-xr-x 1 karel users 52186 Aug 15 12:03 'OvdP GentII 201909 Uitnodiging.odt'
karel@mycomputer ~/data/OvdP Gent II/2019-2020/201909 $
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5910

PostPosted: Sat Aug 17, 2019 4:03 pm    Post subject: Reply with quote

Code:
dagg@NCC-5001D ~ $ cd /tmp
dagg@NCC-5001D /tmp $ touch OvdP\ GentII\ 201909\ Uitnodiging.odt
dagg@NCC-5001D /tmp $ chmod a+x OvdP\ GentII\ 201909\ Uitnodiging.odt
dagg@NCC-5001D /tmp $ ll *.odt
-rwxr-xr-x 1 dagg dagg 0 Aug 17 19:03 'OvdP GentII 201909 Uitnodiging.odt'
dagg@NCC-5001D /tmp $ rm -rf OvdP\ GentII\ 201909\ Uitnodiging.odt
dagg@NCC-5001D /tmp $ ll *.odt
ls: cannot access '*.odt': No such file or directory

_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
kdvgent
Guru
Guru


Joined: 29 Sep 2004
Posts: 352
Location: Belgium

PostPosted: Sat Aug 17, 2019 4:17 pm    Post subject: Still no luck Reply with quote

Quote:

karel@mycomputer ~/data/OvdP Gent II/2019-2020 Jean van der Donk/201909 $ touch 'OvdP GentII 201909 Uitnodiging.odt'
touch: cannot touch 'OvdP GentII 201909 Uitnodiging.odt': No such file or directory
karel@mycomputer ~/data/OvdP Gent II/2019-2020 Jean van der Donk/201909 $ chmod a+x 'OvdP GentII 201909 Uitnodiging.odt'
chmod: cannot access 'OvdP GentII 201909 Uitnodiging.odt': No such file or directory
karel@mycomputer ~/data/OvdP Gent II/2019-2020 Jean van der Donk/201909 $ ls -al
total 1024
drwxr-xr-x 2 karel users 0 Aug 17 16:23 .
drwxr-xr-x 2 karel users 0 Aug 17 16:22 ..
-rwxr-xr-x 1 karel users 52186 Aug 15 12:03 'OvdP GentII 201909 Uitnodiging.odt'
karel@mycomputer ~/data/OvdP Gent II/2019-2020 Jean van der Donk/201909 $ rm -rf 'OvdP GentII 201909 Uitnodiging.odt'
karel@mycomputer ~/data/OvdP Gent II/2019-2020 Jean van der Donk/201909 $ ls -al
total 1024
drwxr-xr-x 2 karel users 0 Aug 17 16:23 .
drwxr-xr-x 2 karel users 0 Aug 17 16:22 ..
-rwxr-xr-x 1 karel users 52186 Aug 15 12:03 'OvdP GentII 201909 Uitnodiging.odt'


To my understanding, the file does not exist anymore on disk but is still listed in the directory. Do not know how this is possible.

But again, thanks for your suggestions
Back to top
View user's profile Send private message
kdvgent
Guru
Guru


Joined: 29 Sep 2004
Posts: 352
Location: Belgium

PostPosted: Sat Aug 17, 2019 4:29 pm    Post subject: Additional info Reply with quote

I assume I should give the following information:

The file is physically on a remote zfs filesystem (FreeNAS).

The zfs filesystem is reported healthy.
Back to top
View user's profile Send private message
kdvgent
Guru
Guru


Joined: 29 Sep 2004
Posts: 352
Location: Belgium

PostPosted: Sat Aug 17, 2019 4:36 pm    Post subject: Solution Reply with quote

Once I remembered that the file was on a zfs filesystem on FreeNAS, I could delete the file by logging in into the FreeNAS server via ssh and delete the file there.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5910

PostPosted: Sat Aug 17, 2019 5:40 pm    Post subject: Reply with quote

glad it worked out for you but just to point out, you've never tried my suggestion.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum