Hot answers tagged

223

┌── ln(1) link, ln -- make links │ ┌── Create a symbolic link. │ │ ┌── the path to the intended symlink │ │ │ can use . or ~ or other relative paths │ │ ┌─────┴────────┐ ln -s /path/to/original /path/to/symlink └───────┬───────┘ └── the path to the original file/...


46

You can't avoid them. They're created to store file information that would otherwise go into an extended attribute on HFS+ (Apple native) or Unix/UFS volumes; in earlier Mac OS this would be the resource fork. Finder file operations will create them automatically to store the icon information, plus Time Machine stores some information in them so if you ...


33

The command is called ln. If used with the option -s it will create a symbolic link in the current directory: ln -s /any/file/on/the/disk linked-file


29

The quote marks are preventing ~ from being expanded to your home folder, so you need to either quote just the part with the space in it: ln -s ~/"Foo Bar/" Foo Note: exactly how much is quoted doesn't matter, as long as the space is in the quoted portion and the ~ isn't. ~/Foo" "Bar/, ~"/Foo Bar/", ~/Fo"o B"ar/ etc are all equivalent. You could also use ...


24

It's generally safe, though a little dangerous depending, to do it but often not worth the effort. The caches in /System/Library/Caches are generally small and useful, the ones in /Library/Caches are less system caches and much more readily cleared. If you have a look in ~/Library/Caches you will find a bunch of applications have a cache in there, none of ...


20

I found the culprit ! Thanks to the suggestion of @Mark Thalkman I made a DTrace script to monitor applications accessing that file. The application that creates the file is called AppWrapper. The way I discovered it was to look at the folders created in October in /Library/Application Support. There were only two, appWrapper and eSellerate. So I ...


20

Zipping from the Finder adds a folder __MACOSX, invisible on Macs, that contains OS X resource forks like custom icons and such. From Wikipedia: The resource fork is a fork or section of a file on the Apple Mac OS operating system used to store structured data along with the unstructured data stored within the data fork. A resource fork stores ...


17

mdls lists file metadata. A sample below for a folder kMDItemContentCreationDate = 2011-11-20 04:05:42 +0000 kMDItemContentModificationDate = 2014-10-22 01:52:53 +0000 kMDItemContentType = "public.folder" kMDItemContentTypeTree = ( "public.folder", "public.directory", "public.item" ) kMDItemDateAdded = 2014-...


14

Purposes of .DS_Store and ._ files http://diigo.com/0qiwp for an annotated view of http://lists.apple.com/archives/applescript-users/2006/Jun/msg00180.html where Matt Deatherage (a former engineer at Apple) offers explanations. Also arnotify » On the origins of .DS_Store (2006-10-01). Since I have seen loss of user data (document content) where ._ ...


13

Hallelujah! I figured it out. Okay, so first thing I did was create a new account, as suggested by another answer. The problem did not occur in there, so clearly the problem was limited to my account. I then went into Safe Mode into my account. The problem did not occur as well. So clearly something was loaded in normal mode but not in safe mode that was ...


11

In a nutshell, how would one access this feature in Finder – not Spotlight (Command+Space) – but the adding of tags themselves? From Finder, highlight a file and hit Cmd-I (or right click and select Get Info) to bring up the File Info Dialog for the file. In this dialog the Spotlight Comments field is where you add tag data. Just add text to this field to "...


10

You can use dot_clean command to remove or merge the ._ files: dot_clean PATH_OF_FOLDER_OR_DRIVE


9

You might not be able to track the process that wrote that file, but why not try. Grab a copy of fseventer or search for that filename in the Time Machine spotlight field to see if you can narrow down when it arrived on your Mac.


9

This was changed in Lion along with the introduction of Auto Save and Versions. Save As is still available by holding ⌥ alt whilst in the menus.


8

h.264 encoded video, AAC audio. Both standards of MPEG 4.


8

This answer may not really answer the question but provide some information what might had happened. I've downloaded the torrent with 4Chan pictures containing the Pain.jpg and two other pics with hebrew chars. Here is the diabolic culprit ;-) ls -aBeil shows: mymac:Reactions user$ ls -aBeil ls: P ͎̮͉͍ͨ̈́̾̈́A ͎̮͉͍ͨ̈́̾̈́I ͎̮͉͍ͨ̈́̾̈́N ͎̮͉͍ͨ̈́̾̈́.jpg: ...


7

There are many things you can try to fix this: Trashing com.apple.finder.plist, com.apple.systemuiserver.plist and com.apple.loginwindow.plist (they will be recreated when you launch Finder) in ~/Library/Preferences and Force Quit Finder Turning off Calculate All Sizes in Finder Turning off Show View Options in Finder Another thing you can try, is to ...


7

This is a classic use case for rsync: rsync -av /source-path/source-dir /destination-path rsync will copy only new and changed files to the new location. It is important to understand how a trailing slash on the source argument functions. If there is a trailing slash then the contents of /source-path/source-dir will be copied to destination-path. If ...


7

This can be done by using the "New Text Document Here" action Select folder -> tab -> start typing "New" -> select "New Text Document Here" -> type name -> enter. If you're looking for a more complete solution that can create any type of file (including ones without the .txt extension that the New Text Document action forces) try this Applescript. Just put ...


7

Being pretty unfamiliar with batch files, I'm not sure of the functionality available, but there are two main scripting methods on OS X which are similar: AppleScript AppleScript is a scripting language which lets you control OS X and many applications. AppleScripts are generally easy to understand and write whilst providing a lot of advanced ...


6

Unfortunately, you just have to remember to do it each time you make a file or directory. There's no way you can do this via software tools or by formatting to a particular file system. After the fact you can use software to convert spaces to '.' or '-' however. Obviously what you describe is an excellent idea and good practice when working in a *nix ...


6

Just typing the operand NOT before the criteria will do the trick. So, in this case, typing NOT .txt will show all the files but the ones with the .txt extension.


6

From the font of all knowledge, the maximum file name size in the default HFS+ file system is 255 UTF-16 encoding units, so basically 255 characters. Technically, any unicode character can be used, but this may be practically limited by the application you are using - for example, the / character is used to delineate directories in pathnames, so you may not ...


6

Press ⌘I, select an application, and press the Change All button: Another option is to use duti. Download the installer and run /usr/local/bin/duti ~/.duti after saving a file like this as ~/.duti: org.videolan.vlc .mkv all net.sourceforge.skim-app.skim .pdf all com.apple.TextEdit public.plain-text all com.macromates.TextMate.preview public.unix-...


6

The File Locations preference pane allows to to specify the location for all documents to be saved. In Word Preferences... select File Locations: When in File Locations, set the path you want Word to use by clicking in the Location field. The default setting, which appears blank in the screencap below, is to ~/Documents.


6

You are right, vanilla Unix doesn't support this. But there is this thing called ACL (Access Control Lists) which allows for a much more granular definition of access rights than the usual user/group/world rights. From Wikipedia: Most of the Unix and Unix-like operating systems (e.g. Linux, BSD, or Solaris) support POSIX.1e ACLs, based on an early POSIX ...


6

387,037,139 bytes is the sum of the file lengths in bytes. A file however uses whole blocks on disk, hence even a one byte file takes one block. On the partition on which I tested this, a block is 4K. The “on disk” value is the number of blocks times the block size. The difference between 684 and 716.9 is a factor of 1.024*1,024, that is the difference ...


6

There's no disk letter in OS X unlike Windows. The mount point for disks is usually /Volumes. For example, files on a flash drive with the name FLASHDRIVE will be located in /Volumes/FLASHDRIVE/. The startup disk is the root, /. Therefore, the Users folder is /Users. No drive letter is prepended to this.


6

Thought I threw my two cents in. Being both a Mac and Linux user - I find that once a SAMBA share is created on a Linux machine (browseable option on Linux samba turned on with or without a login - you can "connect as" from the Mac to the Linux machine), my Mac would pick it up and list in on Finder's left pane. Here's a quick SAMBA setup for the Linux ...


6

Beware : once you change the content of a torrent, you're not able to seed it anymore. Open a finder window, search for all files named .dat then just press cmd+a (select all) then cmd+backspace (delete) then cmd+backspace+maj (empty the bin) You can also use gemini to find duplicates then delete them with Finder, or if you're familiar with bash : find -...



Only top voted, non community-wiki answers of a minimum length are eligible