Deleting Hidden files...

L

ldj

Guest
Hi,
Im fairly new to OS X and i was using Stuffit Expander for some pretty big RAR files. The file was corrupt and i tried to extract it a couple of times. When i was looking through my desktop folder through a program i have, it showed all these files that i cant see on the desktop: like .$$ Stuff.....
I have read that these are hidden files, but i have no idea how to delete them, they are taking up about 2 Gigs of my HD and are completely useless. Can anyone please tell me how to delete them? TIA.
 
Joined
Mar 9, 2004
Messages
2,860
Reaction score
21
Points
38
Location
Miami FL
Your Mac's Specs
G4 1Ghz OS X 10.4.7
Such files can be seen in the terminal using the ls (list with just the l and s) command Make sure you know the file path, and you don't need to change the directory to see the list
 
OP
L

ldj

Guest
I know how to find the files, i dont know how to DELETE the files. Can someone please help me out, tia.
 
Joined
Nov 4, 2003
Messages
654
Reaction score
11
Points
18
Location
Southern Indiana
Your Mac's Specs
Mac Pro Quad Xeon 2.66GHz 3GB RAM, G4 Quicksilver w/Sonnet 1GHz Encore ST, 1ghz G4 Powerbook
If you find them using the desktop "Find" function by setting the visibility to invisible, you should be able to drag them from the results window to the trash.
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
In the Terminal....

rm filename

if it's a directory...

rm -r name
 
Joined
Mar 9, 2004
Messages
2,860
Reaction score
21
Points
38
Location
Miami FL
Your Mac's Specs
G4 1Ghz OS X 10.4.7
rm, unlink - remove directory entries

SYNOPSIS
rm [-dfiPRrvW] file ...
unlink file

DESCRIPTION
The rm utility attempts to remove the non-directory type files specified
on the command line. If the permissions of the file do not permit writ-
ing, and the standard input device is a terminal, the user is prompted
(on the standard error output) for confirmation.

The options are as follows:

-d Attempt to remove directories as well as other types of
files.

-f Attempt to remove the files without prompting for confirma-
tion, regardless of the file's permissions. If the file does
not exist, do not display a diagnostic message or modify the
:
rm, unlink - remove directory entries

SYNOPSIS
rm [-dfiPRrvW] file ...
unlink file

DESCRIPTION
The rm utility attempts to remove the non-directory type files specified
on the command line. If the permissions of the file do not permit writ-
ing, and the standard input device is a terminal, the user is prompted
(on the standard error output) for confirmation.

The options are as follows:

-d Attempt to remove directories as well as other types of
files.

-f Attempt to remove the files without prompting for confirma-
tion, regardless of the file's permissions. If the file does
not exist, do not display a diagnostic message or modify the
:
exit status to reflect an error. The -f option overrides any
previous -i options.

-i Request confirmation before attempting to remove each file,
regardless of the file's permissions, or whether or not the
standard input device is a terminal. The -i option overrides
any previous -f options.

-P Overwrite regular files before deleting them. Files are
overwritten three times, first with the byte pattern 0xff,
then 0x00, and then 0xff again, before they are deleted.

-R Attempt to remove the file hierarchy rooted in each file
argument. The -R option implies the -d option. If the -i
option is specified, the user is prompted for confirmation
before each directory's contents are processed (as well as
:
before each directory's contents are processed (as well as
before the attempt is made to remove the directory). If the
user does not respond affirmatively, the file hierarchy
rooted in that directory is skipped.

-r Equivalent to -R.

-v Be verbose when deleting files, showing them as they are
removed.

-W Attempt to undelete the named files. Currently, this option
can only be used to recover files covered by whiteouts.

The rm utility removes symbolic links, not the files referenced by the
links.

It is an error to attempt to remove the files ``.'' or ``..''.

When the utility is called as unlink, only one argument, which must not
be a directory, may be supplied. No options may be supplied in this sim-
ple mode of operation, which performs an unlink(2) operation on the
passed argument.

:
The rm utility exits 0 if all of the named files or file hierarchies were
removed, or if the -f option was specified and all of the existing files
or file hierarchies were removed. If an error occurs, rm exits with a
value >0.

NOTE
The rm command uses getopt(3) to parse its arguments, which allows it to
accept the `--' option which will cause it to stop processing flag
options at that point. This will allow the removal of file names that
begin with a dash (`-'). For example:
rm -- -filename
The same behavior can be obtained by using an absolute or relative path
reference. For example:
rm /home/user/-filename
rm ./-filename

SEE ALSO
rmdir(1), undelete(2), unlink(2), fts(3), getopt(3), symlink(7)

BUGS
The -P option assumes that the underlying file system is a fixed-block
file system. In addition, only regular files are overwritten, other types of files are not.
 
Joined
Feb 25, 2006
Messages
146
Reaction score
8
Points
18
Location
North America
Your Mac's Specs
Intel 20" Mac
I have the same problem. About 8 folders of StuffIt that didn't unarchive correctly are still on my desktop. I can see them using Azereus and opening a torrent and tehy are listed. I can't drag them into the trash or delete them.

I have deleted these before easily but I forgot how its been a while.

I tried using the 'find' and it never found them.

I tried using Terminal and it said no directory existed.

Is there anyway just to allow to see invisible files and then just to drag them into the trash? Thanks.
 
Joined
Aug 27, 2005
Messages
2,406
Reaction score
210
Points
63
Location
Fayetteville, AR
Your Mac's Specs
15" Powerbook G4 • 24" iMac • iPhone 3Gs
Open Terminal and copy/paste:

defaults write com.apple.Finder AppleShowAllFiles TRUE; killall Finder

This allows all hidden files to be visible in Finder. You can delete them using the normal GUI way, then copy/paste:

defaults write com.apple.Finder AppleShowAllFiles FALSE; killall Finder

This will get you back to normal.

Cheers.
 
Joined
Feb 25, 2006
Messages
146
Reaction score
8
Points
18
Location
North America
Your Mac's Specs
Intel 20" Mac
Thank you! That worked!
 
Joined
Sep 19, 2011
Messages
1
Reaction score
0
Points
1
Hi,

I have a similar problem but I've tried everything and nothing works! :(
A random file just popped up on my desktop called .DS_Store and every time i delete it just keeps on coming back :/ please help!
 
Joined
Mar 16, 2013
Messages
3
Reaction score
0
Points
1
Hi,

I have a similar problem but I've tried everything and nothing works! :(
A random file just popped up on my desktop called .DS_Store and every time i delete it just keeps on coming back :/ please help!

I have the exact same problem and I'm desperate! Someone please help me...
 

bobtomay

,
Retired Staff
Joined
Dec 22, 2006
Messages
26,561
Reaction score
677
Points
113
Location
Texas, where else?
Your Mac's Specs
15" MBP '06 2.33 C2D 4GB 10.7; 13" MBA '14 1.8 i7 8GB 10.11; 21" iMac '13 2.9 i5 8GB 10.11; 6S
I have the exact same problem and I'm desperate! Someone please help me...

Turn off show hidden files by the same method you used to turn it on.

Or use the 2nd Terminal command in surfwax's post above.
 

bobtomay

,
Retired Staff
Joined
Dec 22, 2006
Messages
26,561
Reaction score
677
Points
113
Location
Texas, where else?
Your Mac's Specs
15" MBP '06 2.33 C2D 4GB 10.7; 13" MBA '14 1.8 i7 8GB 10.11; 21" iMac '13 2.9 i5 8GB 10.11; 6S
Why are you deleting hidden files - they are typically hidden because they are "system" files and for the most part you should not be touching any of those files that you do not know "for sure" what they are unless you're in the mood to possibly need to reinstall your operating system.

Exactly what is it that you want to delete?
 
Joined
Mar 16, 2013
Messages
3
Reaction score
0
Points
1
Why are you deleting hidden files - they are typically hidden because they are "system" files and for the most part you should not be touching any of those files that you do not know "for sure" what they are unless you're in the mood to possibly need to reinstall your operating system.

Exactly what is it that you want to delete?

Well, to be honest, I actually have no idea what they are. But I saw some folders have a .ds_store file, and a .localized, and I don't know what they are, or why they have them, specially why some of them have them.

I'd also like to delete them because when I send anything to a Window's user or open folders from my mac in a Windows, some files I didn't create appear, and it's really annoying. (Specially when I have to send projects to my professors from University, or submit them online)
 

bobtomay

,
Retired Staff
Joined
Dec 22, 2006
Messages
26,561
Reaction score
677
Points
113
Location
Texas, where else?
Your Mac's Specs
15" MBP '06 2.33 C2D 4GB 10.7; 13" MBA '14 1.8 i7 8GB 10.11; 21" iMac '13 2.9 i5 8GB 10.11; 6S
Like I said above and I cannot stress this enough...

DO NOT DELETE ANYTHING YOU DO NOT KNOW FOR CERTAIN WHAT IT IS.

You are not going to be able to delete the .DS_Store files and if you do, the system is going to automatically generate a new one. That file, for instance the one on your Desktop, is where the information for what you have on the Desktop, the locations of icons on the Desktop, etc., is stored.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top