You are not logged in.

#1 2013-11-04 10:55:45

jiros
Member
From: Abadan, Khuzestan, Iran
Registered: 2013-10-23
Posts: 80

how to delete files from external ntfs hard disk [Solved]

Hi guys
first, sorry for my bad English.

I have an external hard disk ( WD 500GB ) with ntfs file system and i have installed ntfs-3g package.
3 days ago, when i wanted to delete some files, i get a problem with it,
look the output :

[jahangir@Arch New Metal]$ sudo rm *
[sudo] password for jahangir: 
rm: cannot remove '02 - Korn - Love and Meth.mp3': No such file or directory
rm: cannot remove '30Seconds To Mars': No such file or directory
rm: cannot remove '30Seconds To Mars 1': Is a directory
rm: cannot remove 'Avantasia': No such file or directory
rm: cannot remove 'Avantasia 1': Is a directory
rm: cannot remove 'Avantasia 2': Is a directory
rm: cannot remove 'Behemoth': No such file or directory
rm: cannot remove 'Behemoth 1': Is a directory
rm: cannot remove 'Hanging Garden - At Every Door - 2013': No such file or directory
rm: cannot remove 'Hanging Garden - At Every Door - 2014': No such file or directory
rm: cannot remove 'Rosetta': No such file or directory
rm: cannot remove 'Rosetta 1': No such file or directory
rm: cannot remove 'Sepultura': No such file or directory
rm: cannot remove 'Sepultura 1': No such file or directory
rm: cannot remove 'Slipknot': No such file or directory
rm: cannot remove 'Slipknot 1': No such file or directory
rm: cannot remove 'Tokio Hotel': No such file or directory
rm: cannot remove 'Tokio Hotel 1': No such file or directory
rm: cannot remove 'T\303\275r': No such file or directory
rm: cannot remove 'neww': No such file or directory
[jahangir@Arch New Metal]$

Who can help me ?
--------------------------------------------------------------------------------------------------------------------------------------------------------------
I wanted to delete .trash-1000 file from my main directory hard dist and i confront with this error :

[jahangir@Arch My Passport]$ sudo rm .Trash-1000
[sudo] password for jahangir: 
rm: cannot remove '.Trash-1000': No such file or directory
[jahangir@Arch My Passport]$

In the event that it is there.

also in main directory of my hard disk i have 1 mp3 file that i can't view it in file manager and it will be displayed in Windows OS and with ls command in terminal :

[jahangir@Arch My Passport]$ ls 
ls: cannot access 01 - Lost.mp3: No such file or directory
ls: cannot access 02 - Surrendered To The Decadence.mp3: No such file or directory
01 - Lost.mp3                          In The Name Of God  Videos                                  ZzZ - IMAN  winold
02 - Surrendered To The Decadence.mp3  New Metal           World of Warcraft Cataclysm 4.3.4 enGB  navid       wow wrath
[jahangir@Arch My Passport]$

what is this file and how can i delete .Trash-1000 and this files and content of "New Metal" directory ?

Last edited by jiros (2013-12-23 20:57:05)


Freedom of mind with ArchLinux

Offline

#2 2013-11-04 13:04:44

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: how to delete files from external ntfs hard disk [Solved]

'rm *' won't remove directories. Read 'man rm' for details.


Have you tried removing these files and directories from Windows?



When posting configs, code or command output, please use [ code ] tags https://bbs.archlinux.org/help.php#bbcode

like this

It makes the code more readable and - in case of longer listings - more convenient to scroll through.

Last edited by karol (2013-11-04 13:05:09)

Offline

#3 2013-11-04 13:42:38

jiros
Member
From: Abadan, Khuzestan, Iran
Registered: 2013-10-23
Posts: 80

Re: how to delete files from external ntfs hard disk [Solved]

I know that
But i used -r with command
Yes, I have tried removing these files from Windows but it can't
Apart from the directories, why not deleted files ?


Freedom of mind with ArchLinux

Offline

#4 2013-11-04 16:10:52

mrinx
Member
From: Richmond, VA
Registered: 2013-08-01
Posts: 87
Website

Re: how to delete files from external ntfs hard disk [Solved]

There is something like rm -rf, but don't use it, if you aren't sure about what you are doing. May I see output of mount on your system?


English isn't my first language.
Is Arch Linux user called archer? Where are our bows and arrows?

Offline

#5 2013-11-04 20:20:23

jiros
Member
From: Abadan, Khuzestan, Iran
Registered: 2013-10-23
Posts: 80

Re: how to delete files from external ntfs hard disk [Solved]

Yes of course

[jahangir@Arch ~]$ mount -l
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=1031688k,nr_inodes=219171,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sda1 on / type ext4 (rw,relatime,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=28,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw)
/dev/sda2 on /home type ext4 (rw,relatime,data=ordered)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
/dev/sdb1 on /run/media/jahangir/My Passport type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096) [My Passport]
[jahangir@Arch ~]$

Freedom of mind with ArchLinux

Offline

#6 2013-11-04 21:23:55

mrinx
Member
From: Richmond, VA
Registered: 2013-08-01
Posts: 87
Website

Re: how to delete files from external ntfs hard disk [Solved]

Hmmm, I don't know then (your mount looks ok to me)... Isn't filesystem of that disk broken? Could you post output of ls -lah from the root folder of your external hdd?


English isn't my first language.
Is Arch Linux user called archer? Where are our bows and arrows?

Offline

#7 2013-11-04 22:12:57

jiros
Member
From: Abadan, Khuzestan, Iran
Registered: 2013-10-23
Posts: 80

Re: how to delete files from external ntfs hard disk [Solved]

[jahangir@Arch My Passport]$ ls -lah
ls: cannot access 01 - Lost.mp3: No such file or directory
ls: cannot access 02 - Surrendered To The Decadence.mp3: No such file or directory
total 88K
drwx------  1 jahangir users  12K Nov  4 15:14 .
drwxr-x---+ 3 root     root    60 Nov  5 01:33 ..
-rw-------  1 jahangir users  31K Jun 13 18:35 .Trash-1000
-?????????? ? ?        ?        ?            ? 01 - Lost.mp3
-?????????? ? ?        ?        ?            ? 02 - Surrendered To The Decadence.mp3
drwx------  1 jahangir users  12K Oct 22 13:34 In The Name Of God
drwx------  1 jahangir users 8.0K Oct 22 13:36 New Metal
drwx------  1 jahangir users    0 Aug  1 23:53 Videos
drwx------  1 jahangir users 4.0K Nov 14  2012 World of Warcraft Cataclysm 4.3.4 enGB
drwx------  1 jahangir users 8.0K Aug  2 00:26 World of Warcraft Wrath of the Lich King 3.3.5a enGB
drwx------  1 jahangir users    0 May 30 05:44 ZzZ - IMAN
drwx------  1 jahangir users  12K Jun 16 10:54 navid
drwx------  1 jahangir users    0 May 30 03:02 winold
[jahangir@Arch My Passport]$

Freedom of mind with ArchLinux

Offline

#8 2013-11-04 22:25:42

mrinx
Member
From: Richmond, VA
Registered: 2013-08-01
Posts: 87
Website

Re: how to delete files from external ntfs hard disk [Solved]

Do you have access to windows machine? I suggest you to run chkdsk on windows. Alternatively, you can try to run ntfsfix.

For more information viz https://wiki.archlinux.org/index.php/NT … leshooting

To me it looks like broken filesystem. I don't see any reason why any file should have question marks instead of rwx bits...


English isn't my first language.
Is Arch Linux user called archer? Where are our bows and arrows?

Offline

#9 2013-11-05 07:33:02

jiros
Member
From: Abadan, Khuzestan, Iran
Registered: 2013-10-23
Posts: 80

Re: how to delete files from external ntfs hard disk [Solved]

Yes i have access

I don't know anything about chkdsk and ntfsfix command on Linux and Windows.
Please, Give details about this command and consequences of implementing the command separately.


Freedom of mind with ArchLinux

Offline

#10 2013-11-05 12:37:24

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: how to delete files from external ntfs hard disk [Solved]

ntfsfix is useless, the manual even says so, run chkdisk/righ click -> check for errors  from windows.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#11 2013-11-05 14:25:43

mrinx
Member
From: Richmond, VA
Registered: 2013-08-01
Posts: 87
Website

Re: how to delete files from external ntfs hard disk [Solved]

jiros wrote:

I don't know anything about chkdsk and ntfsfix command on Linux and Windows.
Please, Give details about this command and consequences of implementing the command separately.

I'm not a windows guru, but maybe help chkdsk could be helpful.

Mr.Elendig wrote:

ntfsfix is useless, the manual even says so, run chkdisk/righ click -> check for errors  from windows.

If is ntfsfix really useless, then what is a purpose of it?


English isn't my first language.
Is Arch Linux user called archer? Where are our bows and arrows?

Offline

#12 2013-11-05 16:11:18

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: how to delete files from external ntfs hard disk [Solved]

NTFS is a proprietary file system that has no publicly available documentation as to its internal structure.  I would not trust any utilities that do not come from the vendor of that operating system.  It is up to you to decide whether you trust any tools that do come from the vendor of the operating system.

Personally, I would not use NTFS on any disk that I would not be willing to use to scape the mud off of my shoes.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#13 2013-11-05 16:35:51

mrinx
Member
From: Richmond, VA
Registered: 2013-08-01
Posts: 87
Website

Re: how to delete files from external ntfs hard disk [Solved]

Yeah, I know these things and I agree with you. On the other hand, as far as I know, ntfs-3g doesn't come from that vendor either. I have no experience with ntfsfix, I don't know its abilities; but if he uses ntfs-3g, then he shouldn't be afraid, by the same standard, of using ntfsfix first.


English isn't my first language.
Is Arch Linux user called archer? Where are our bows and arrows?

Offline

#14 2013-11-05 20:24:40

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: how to delete files from external ntfs hard disk [Solved]

The Fine Manual wrote:

DESCRIPTION
       ntfsfix  is  a  utility that fixes some common NTFS problems.
       ntfsfix is NOT a Linux version of chkdsk.   It  only  repairs
       some  fundamental NTFS inconsistencies, resets the NTFS jour‐
       nal file and schedules an  NTFS  consistency  check  for  the
       first boot into Windows.

       You  may  run  ntfsfix  on an NTFS volume if you think it was
       damaged by Windows  or  some  other  way  and  it  cannot  be
       mounted.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#15 2013-11-19 09:51:29

jiros
Member
From: Abadan, Khuzestan, Iran
Registered: 2013-10-23
Posts: 80

Re: how to delete files from external ntfs hard disk [Solved]

I performed both commands, but it doesn't correct
How can i fix it ?

--------------------------------------------------
if i want to change file system of my external hard disk, how can i do that ? ( for example ext4 )


Freedom of mind with ArchLinux

Offline

#16 2013-11-19 11:51:13

Seaco
Member
Registered: 2013-11-15
Posts: 4

Re: how to delete files from external ntfs hard disk [Solved]

If it is to delete everything on the drive, why not format? its an external hd.

*edit
if you want to change the filesytem is really formating the drive.
you can use a gui tool like gparted or a comand line tool like mkfs

Last edited by Seaco (2013-11-19 11:54:08)

Offline

#17 2013-11-19 15:14:04

mrinx
Member
From: Richmond, VA
Registered: 2013-08-01
Posts: 87
Website

Re: how to delete files from external ntfs hard disk [Solved]

I believe you used ntfs for a reason. As far as I know, Windows isn't friendly with hdd filesystems others than fat or ntfs, so once you format your external harddrive to ext4, windows won't talk to it at all, unless you install some additional driver or software.

You have several possibilities to do:
1) You could use FAT32, it's kind of a dumb filesystem, linux, mac and windows can read and write to it, there are some limitations like file permisions or 4GB file size limit.
2) You could make multiple partitions on your external harddrive, one with ntfs (for windows) and the other with some fs that is support natively in Linux and Mac, I believe only option would be HFS+. I'm not an expert, maybe somebody will correct me. Anyway, if you aren't going to connect your disk to Mac, than ext4 would be a good choice. But this approach with two different partions is kind of dumb, because usually you need the same data available on whatever platform.
3) If I were you, I would continue using NTFS or FAT32. It's not ideal, but it's a price you have to pay for dealing with Windows systems.
4) If there is any other smarter solution, I believe somebody will add it to responses bellow.

Anyway, it's weird that your problem persists. There has to be something wrong with your filesystem, otherwise ls wouldn't show you question marks in its output. Did you perform chkdisk via GUI? It has to say that either there wasn't any error with your fs, or that there was some error. We live (unfortunatelly) in binary computer world. I mean you can perform that command from shell, or however microsoft calls it, and if you run it in a proper configuration, it will tell you whether your fs is bad or not and perform needed repairs.

And how to format disk to ext4?
Backup your data, run as root fdisk /dev/yourexthdd (fdisk /dev/sdd), delete all partitions, create new ones, once you are done, write changes down. fdisk is pretty easy to use, don't be afraid of it. Then you have to create filesystem on each partition you created with fdisk, so if you created only one, run mkfs.ext4 /dev/yourexthddwithpartnumber (mkfs.ext4 /dev/sdd1). There are nice articles about doing these things on Arch Wiki (https://wiki.archlinux.org/index.php/File_Systems), don't be worried to read them wink


English isn't my first language.
Is Arch Linux user called archer? Where are our bows and arrows?

Offline

#18 2013-11-19 15:47:07

xzenocrimzie
Member
From: Canada
Registered: 2013-04-16
Posts: 12

Re: how to delete files from external ntfs hard disk [Solved]

The command that I use to delete massive amounts of files and directories is the command:

rm -r <directory>

the -r operator is recursive removal, and it should remove every single file plus the directory that you put in the command.

Offline

#19 2013-11-19 15:55:55

mrinx
Member
From: Richmond, VA
Registered: 2013-08-01
Posts: 87
Website

Re: how to delete files from external ntfs hard disk [Solved]

He mentioned using -r before, anyway, he has also problems with deleting single files, because they are probably corrupted.


English isn't my first language.
Is Arch Linux user called archer? Where are our bows and arrows?

Offline

#20 2013-11-19 17:36:09

scatterplot
Member
Registered: 2013-10-15
Posts: 17

Re: how to delete files from external ntfs hard disk [Solved]

Log into Windows and open a command prompt (right click to open as administrator) Of course this is 7 and below. With 8 and 8.1  you have to go to APPS>ALL APPS>Windows System>Command Prompt. Not sure in 8 or 8.1 if you can search for cmd or not.

The prompt will open to the default directory, usually the directory where all the command prompt .EXE's are kept. Likely to be C:\Windows\System32 or similiar. Anyway, type: chkdsk X: (X being the drive letter)

You could also run: chkdsk /f X:   This will run chkdsk and repair the file system if needed.

The disk will need to be unmounted. However if it is a corrupted filesystem/drive, Windows7 and above should recognize this and offer to repair the file system for you.

If for any reason this does not want to work, Windows chkdsk will asked you if you want to add the disk to the chkdsk list at startup. Click yes, shutdown and reboot, leaving the drive plugged in. Upon reboot Windows then will run chkdsk on it.


Load"*",8,1

Offline

#21 2013-11-19 20:16:40

jiros
Member
From: Abadan, Khuzestan, Iran
Registered: 2013-10-23
Posts: 80

Re: how to delete files from external ntfs hard disk [Solved]

Thanks
Mrinx, What is benefit HFS+ than ext4 ? ( I hate Apple totally and there is not any reason to connect my external hard drive to any Apple products )
------------------------------------------------------------------
One other question
If i want to limit access to my ext. hard to root user in Linux, how can i do that ? ( Just i want limit write access and i want to anybody can read it, I want do that for bridle fortuitous deleting )


Freedom of mind with ArchLinux

Offline

#22 2013-11-19 21:01:45

mrinx
Member
From: Richmond, VA
Registered: 2013-08-01
Posts: 87
Website

Re: how to delete files from external ntfs hard disk [Solved]

I think there is no benefit, but I believe Apple is currently using HFS+ as a filesystem. Oh, now I see I was semi-wrong smile So, HFS+ with disabled journaling should work under both mac and linux, that was the reason I mentioned HFS+. If you aren't going to stick your disk to any Mac, than I would go for ext4. But as I said before, ext4 and windows aren't friends (I would blame microsoft for that).

I think that if you are using, lets say, ext4 filesystem, than it will keep filesystem attributes in similar way like we know it in linux. Hmmm, that sentence sounds weird, I hope somebody will correct me soon smile

(I don't want to start a flame here, but I kind of like Apple, but I'm not using its products on daily basis. The other day my friend went to the Apple Store to get new power adapter, her laptop was 5 or so years old so without any warranty, and they exchanged it for free (their normal price for that thingie is 61 USD). You pay premium price for the product, but then you will get corresponding care... At least sometimes, that dude there just killed her laptop by holding power button, and then he said, that we didn't have time to wait for it to shutdown normally. I know I'm really off-topic here, but does anybody know, how is their HFS+ protected against actions like that? smile)


English isn't my first language.
Is Arch Linux user called archer? Where are our bows and arrows?

Offline

Board footer

Powered by FluxBB