Osx invisible files that get uploaded


#1

i dont know if i’m the only person with this problem, but i use osx and as i build my sites completely locally before uploading the entire thing, osx likes to make these invisible files called ds_store files that help it in previewing the local directories in different views and such. i’ve run into a problem with some of these files getting uploaded onto my dreamhost space, and while they’re harmless, they’re fine until i go to try and delete them or delete a folder that has them in there. the only way so far i’ve been able to get rid of them is email support and have those friendly guys do some serverside fancy shell commands or something to nukify those files. so i was just going to promote “ds_store cleaner”
( http://www.versiontracker.com/dyn/moreinfo/macosx/18665 ) available from version tracker. just a minor annoyance to remember to run your directory through this before uploading, … < / my 2 ¢ >


#2

Thanks for the heads up, but, really why do they bother you that much? They are harmless and won’t affect your site’s operation.

  • wil

#3

right, until you try and delete the files or any directory they’re sitting in. being the highly organized neat freak i am when it comes to my site’s structure and so forth, it gets confusing having old folders and such that cant be deleted because of some buried icon file 3 directories deep within… for me at least


#4

You can’t delete them? They should be owned by you. Maybe your FTP client doesn’t allow you to delete system/hidden (. _) files?

  • wil

#5

the files have no extension, and no size either (they read as having 0 bytes…), when trying to delete them with several different kinds of ftp clients, it says 'server said: icon: no such file or directory (error -144)
connecting to the directory via osx’s built in ftp and trying to delete the files that way tells me i dont have permission to do this…
the file seems to be a read only file with no size and no file extension whatsoever.


#6

the Finder’s FTP doesn’t write, just reads.

I use Interachy for FTP. I has a setting to ignore files that begin with . - I usually keep this on unless I want to edit one.


#7

(Wil)

[quote]Thanks for the heads up, but, really why do they bother you that
much? They are harmless and won’t affect your site’s operation.

[/quote]

Most Mac users in my experience - myself included - are neat freaks. :>

[quote]You can’t delete them? They should be owned by you. Maybe your
FTP client doesn’t allow you to delete system/hidden (. _) files?

[/quote]

I’m actually the support person who deleted these files for him. When I searched for them, it turned out that the file names had some strange control characters in them. Perhaps this occurred when the files were uploaded, but in any case I imagine the FTP client in question choked on that.

  • Jeff @ DreamHost
  • DH Discussion Forum Admin

#8

From the command line, just doing:
rm ._* should work.


#9

yeah, but wouldn’t that wipe out any other important .files?

In my root, I’ve got
.viminfo
.forward.dh1
.cshrc
.bashrc
.bash_profile
.bash_history
.alias
.SAConfig.php
.DS_Store

Some should be there, some are old… the only OS X specific one I see is .DS_Store. I was able to use my FTP client to delete it. Keep in mind, I had to uncheck “ignore .files” and check “Send LIST -a”.


#10

I can delete all of mine using ‘Transmit’ (the os x ftp client). I had to change one setting so that Transmit could view hidden files, but it has no problem deleting them.

Cheers

  • wil

#11

I don’t think ._* would remove any of the files you mention, since none of them have an underscore as the first character. I believe in this case, “.” will be treated as a literal dot and not as a regexp for “any single character”.

For instance:
jazz% touch a_
jazz% ls .*
zsh: no matches found: .
*
jazz% rm .*
zsh: no matches found: .
*

Also, I assumed that you were doing this in a directory you’re uploading files to; presumably not your web root.


#12

ah, ok. I thought he put the underscore in as a placeholder for file name, as he mentioned DS_Store and it doesn’t begin with an underscore… I might have just been tired.


#13

The ds_store files on my system (os x 10.3, panther) only begin with a period and not an underscore.

spoon% ls -la total 64 drwxr-xr-x 22 wil staff 748 25 Feb 11:11 . drwxrwxr-t 6 root admin 204 27 Nov 17:01 .. -rw-r--r-- 1 wil staff 12292 4 Mar 16:47 .DS_Store ... Of course, as will said, you wouldn’t be uploading these files to your web root anyway, but the method mentioned could wipe out .htaccess files.

  • wil