maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   ._filenames ? Useless? Can they be removed? (https://talk.maemo.org/showthread.php?t=23104)

mfortner 2008-08-23 14:36

._filenames ? Useless? Can they be removed?
 
I have a number of duplicated file names preceded with "._" which seem to do nothing but fill up my file lists with files that don't open. The first time I noticed them was in MPlayer. There were only a few and it was not not a big deal. In Media Box however there are WAY too many.

None of them open nor can they be found by the search tool.

Are they junk that can be removed?

If so I'm guessing it would be via the terminal which I'm not afraid to use, but lack the expertise to know the commands find and remove them.

I tried this: find / -name '._'
to no avail.

iamthewalrus 2008-08-23 15:00

Re: ._filenames ? Useless? Can they be removed?
 
I'm not sure what kind of files they are but you can find them with:

find / -name '._*'

If you're sure you can delete them, this deletes all files starting with ._ in folder /home/user/ and subfolders:

find /home/user -name '._*' -type f -print0 | xargs -0 /bin/rm -f

GeneralAntilles 2008-08-23 15:24

Re: ._filenames ? Useless? Can they be removed?
 
They're stupid stuff generated by OS X. There's a way to turn them off, but I don't recall the method. Google it.

mfortner 2008-08-23 15:34

Re: ._filenames ? Useless? Can they be removed?
 
Quote:

Originally Posted by iamthewalrus (Post 216740)
I

find /home/user -name '._*' -type f -print0 | xargs -0 /bin/rm -f

Thanks. Can you interpret this? Am I doing something wrong?

xargs: invalid option -- 0
BusyBox v1.6.1 (2008-05-22 10:32:35 EEST) multi-call binary

iamthewalrus 2008-08-23 15:59

Re: ._filenames ? Useless? Can they be removed?
 
Quote:

Originally Posted by mfortner (Post 216752)
Thanks. Can you interpeet this? Am I doing something wrong?

xargs: invalid option -- 0
BusyBox v1.6.1 (2008-05-22 10:32:35 EEST) multi-call binary

Sorry you're right. That option works with the version of xargs in regular desktop linux distros but not with the trimmed down Busybox version that is on the tablets. So I wouldn't know how to delete those files in one go. But at least you can find them with the find command.

pycage 2008-08-23 16:09

Re: ._filenames ? Useless? Can they be removed?
 
Code:

find /home/user -name '._*' -type f -exec rm "{}" \;
does the job.

iamthewalrus 2008-08-23 16:27

Re: ._filenames ? Useless? Can they be removed?
 
Quote:

Originally Posted by pycage (Post 216761)
Code:

find /home/user -name '._*' -type f -exec rm "{}" \;
does the job.

That doesn't work with the BusyBox version of find either.

qwerty12 2008-08-23 16:32

Re: ._filenames ? Useless? Can they be removed?
 
Who is up for editing the busybox's debconfig and adding some options in? I took a look last time using make menuconfig after apt-get source busybox from nokia's sdk repo and it has a lot of find related options disabled.

mfortner 2008-08-24 02:59

Re: ._filenames ? Useless? Can they be removed?
 
Argh! I'm stuck. Very frustrating not knowing what to do. I figured out how to remove them file by file using rm media/mmc2/folder/file.ext etc. I discovered that command will not work with file names that have a space. For example: I can rm mysong.mp3, but not my song.mp3 or 01 mysong.mp3

I also tried installing Emelfm2 file manager. I got the file unzipped and gpe file manager shows an Emelfm2 folder sitting in home/user, but I'm stuck there not knowing how to compile it. I have cmake installed.

So I know I'm operating WAY out of my range here, but hey how else do you learn?

mfortner 2008-08-24 03:27

Re: ._filenames ? Useless? Can they be removed?
 
I found another way to remove them. I changed the name of the containing folder. Recycled the original name to a new folder. I copied the visible files to the new folder and trashed the old folder with the hidden files in it. xterm conforms they are gone.

I'd still like to know the deal with the spaces in file names and install emelfm2?

Valeria 2008-08-24 04:22

Re: ._filenames ? Useless? Can they be removed?
 
Hi, I downloaded emelfm2 from here: http://www.internettablettalk.com/fo...ad.php?t=18462 it is a nice .deb, so just click and install. Good luck.

fatalsaint 2008-08-24 05:12

Re: ._filenames ? Useless? Can they be removed?
 
Just for future note to people.. to delete a file with a space in command line you need to use an escape character (\).. so

Code:

rm -f my\ file.mp3
Also.. if you press tab after typing part of a file name; if it's the only file in the directory that starts that way it will auto-complete the filename for you.. with the escape's where they are needed. So typing "my" and press tab.. will produce the above result.

AstroGuy 2008-08-24 05:30

Re: ._filenames ? Useless? Can they be removed?
 
My way of deleting files like these from a file system is:

rm -i `find ._*`

remove the -i if you don't want to confirm the deletion of each file, just remember there is no 'un'rm

brontide 2008-08-24 12:57

Re: ._filenames ? Useless? Can they be removed?
 
Quote:

Originally Posted by AstroGuy (Post 216896)
My way of deleting files like these from a file system is:

rm -i `find ._*`

remove the -i if you don't want to confirm the deletion of each file, just remember there is no 'un'rm

The problem with this and some of the other methods is they are not "space" friendly. So if you have "._My Document" and "Document" it will match on the first and then rm -i ._My Document where ._My is non-existent and Document will happily delete your other file.

rcull 2008-08-24 19:14

Re: ._filenames ? Useless? Can they be removed?
 
Try this

Code:

~/trial $ ls -a
.        ..        ._my doc  ._mydoc  mydoc

Code:

~/trial $ for f in ._*
> do
> rm "$f"
> done

Code:

~/trial $ ls -a
.      ..    mydoc

rick

brontide 2008-08-24 19:50

Re: ._filenames ? Useless? Can they be removed?
 
or on one line
Code:

for file in ._*; do rm "$file";done

rcull 2008-08-25 19:32

Re: ._filenames ? Useless? Can they be removed?
 
or
ls ._* | while read file;do rm "$file";done

zerojay 2008-08-26 11:59

Re: ._filenames ? Useless? Can they be removed?
 
Quote:

Originally Posted by fatalsaint (Post 216892)
Just for future note to people.. to delete a file with a space in command line you need to use an escape character (\).. so

Code:

rm -f my\ file.mp3
Also.. if you press tab after typing part of a file name; if it's the only file in the directory that starts that way it will auto-complete the filename for you.. with the escape's where they are needed. So typing "my" and press tab.. will produce the above result.

You can also quote the file name: "my file.mp3".

free 2008-08-26 12:25

Re: ._filenames ? Useless? Can they be removed?
 
Quote:

Originally Posted by qwerty12 (Post 216770)
Who is up for editing the busybox's debconfig and adding some options in? I took a look last time using make menuconfig after apt-get source busybox from nokia's sdk repo and it has a lot of find related options disabled.

That would be a good idea yep! :)
Not only for find, for a lot of other things probably..


All times are GMT. The time now is 21:45.

vBulletin® Version 3.8.8