Solved

How do I delete a file with special characters in Linux that has been created by SAMBA?

Posted on 2009-04-09
1
335 Views
Last Modified: 2013-12-16
I use Samba for my fileserver. Files created from Windows with spaces and special characters create problems. From Windows I can delete or rename the files, but not from the command prompt on the server. I need to be able to delete or rename the files from Linux, not just from Windows.

Server: RHEL 5

"Filsystem med kun lesetilgang" is Norwegian and means "Filesystem with only read access".
[root@mymachine div]# ll
totalt 128
-rwxr-x--- 1 hans felles 41483 jun 17  2007 Bilde 016.jpg
-rwxr-x--- 1 hans felles 33008 jun 17  2007 div 2 ?r 001.jpg
-rwxr-x--- 1 hans felles 33008 jun 17  2007 div 2 ?r 001.jpg
[root@mymachine div]# 
 
 
[root@mymachine div]# rm -f *
rm: cannot remove «Bilde 016.jpg»: Filsystem med kun lesetilgang
rm: cannot remove «div 2 \345r 001.jpg»: Filsystem med kun lesetilgang
rm: cannot remove «div 2 \206r 001.jpg»: Filsystem med kun lesetilgang
[root@mymachine div]#

Open in new window

0
Comment
Question by:ictb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
chiragypatil earned 125 total points
ID: 24105401
The error message says
rm: cannot remove «Bilde 016.jpg»:
which means the file name is being read as a whole. The problem here ,i think, is read access.
Try to unmount the file system and then mount the file system again with read and write permissions for the root user.
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question