Hot answers tagged


┌── ln(1) link, ln -- make links │ ┌── Create a symbolic link. │ │ ┌── the optional path to the intended symlink │ │ │ if omitted, symlink is in . named as destination │ │ │ can use . or ~ or other relative paths │ │ ┌─────┴────────┐ ln -s /path/to/...


You can use dot_clean command to remove or merge the ._ files: dot_clean PATH_OF_FOLDER_OR_DRIVE If you move files to linux, or have Git Bash on your PC, and have access to the find command, you might also be able to do this: find . -type f -name '._*' -delete And they're gone!


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


You can also do this in Terminal. Go to the directory where you want to create the file, then run the following: touch file.txt Or redirect 'nothing' to a text file > file.txt


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 ...


The simplest version does not require a file or folder to be selected, and adds a keyboard shortcut of your choice. Part 1: Create a new Quick Action (was Service) In Automator, create a new Quick Action (previously called a Service): From the left site, click Utilities then drag "Run Applescript" over to the right panel. Change the two pulldown menus at ...


This is SilverInstaller, adware to download more adware and ‘potentially unwanted programs’. This was likely distributed through fake Flash popups, which someone on the system clicked on, downloaded, opened, installed and provided administrator credentials to. Installed software in this package likely includes MacKeeper, VSearch, A Pirrit injector,...


I know this question is explicitly asking about the Terminal, but if you're in GUI Land and don't want to enter Terminal Land, you can use SymbolicLinker. This puts a "Make Symbolic Link" option in your Services menu in Finder.


It's just ln -s <source> <destination>.


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.item" ) kMDItemDateAdded = 2014-...


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 ...


If you have the Finder window open, use Spotlight to open TextEdit. When you're ready to save the file, option+drag the text file icon from the title bar of TextEdit into the Finder window where you want to save it.


This is because it loads the previews of the files, which replace the default file icons. To disable icon previews on the desktop, click on the desktop, press ⌘J and uncheck ‘Show icon previews’.


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 ...


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 information ...


These files are created by the operating system to speed up searches, store metadata (data used by the OS) about a folder preferences, etc. Windows and OS X both have these kinds of files. Following, is a description of these files pulled from .DS_Store – The name of a file in the Apple OS X operating system ...


Here is my workaround: Do this once, create an empty text file in your desktop to serve as template. Opt/Alt-drag this file to the folder to make a copy.


You might also use fdupes. It doesn't have an option to search for duplicates of a specific file, but you can just grep the output for the filename: fdupes -r1 .|grep filename -r recurses into directories and -1 prints each group of duplicate files on a single line. Other useful examples: fdupes -r . finds all duplicate files under the current directory;...


You can do this quite simply and quickly in Terminal: cd /path/to/start/renaming find . -name '*\<*' | while read f; do echo mv "$f" "${f//\</}"; done The command above is a "dry-run" of the command below: find . -name '*\<*' | while read f; do mv "$f" "${f//\</}"; done This will remove any < characters recursively on files and folders ...


In your open/save window, press Cmd-Shift-G to open a window where you can paste the path. This also works in Finder.


There's two ways to do this, the easiest is the first option; Open TextEdit and type whatever you need into it then save it to the location you want the file to live. You can open TextEdit quickly by invoking Spotlight and being typing Tex..., you should see the top hit is the app you want so you can just press enter to open it. This is more involved and ...


It's up to individual apps to decide whether to show hidden files and to provide options to change it. The ‘AppleShowAllFiles’ key is written to ‘’, so it only applies in Finder. Finder's GUI option for changing this setting is ⇧⌘.. Other apps may have their own options, which you'll need to investigate on a per-app basis. For example, How ...


fs_usage is your tool for this. The file system usage tool is ideal since it taps in to the real time file system events and dumps activity to a file or the screen. Since you know the exact path of the file, you can filter out all the thousands of irrelevant (to this case) filesystem changes and see what reads / writes to that file pretty quickly. If your ...


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 ...


Preview only works with PDF files and some image files (png, jpg, gif, tiff, bmp) so you won't be able to open a text file on Preview. To open your info.txt file from terminal you need to choose an application that can open text files, like TextEdit or any other text editor. You also could use open -e file, to open any file using TextEdit.


This command is for comparing values, checking file types etc. Here's a man page: NAME test, [ -- condition evaluation utility SYNOPSIS test expression [ expression ] It's usually used like this: if [ -f /etc/passwd ] then echo "Yes" else echo "No" fi For more info, please read the man page ( man [ ).


Check my answer at - SuperUser. NOTE: After the introduction of SIP, this app does not work unless you disable it. Read more on how to do it, but it is ill-advised. Try XtraFinder. This app is just great, solved all my basic needs after switching from a windows platform like adding "New File" in context menu and finder toolbar, etc. Some of the ...


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 public.plain-text all com.macromates.TextMate.preview public.unix-executable ...


It's safe to delete this file. It is a file left behind by the OS X installer in later versions. It seems to always be there after installation, so its existence does not indicate a failure in it self. What the installer actually uses the file for is not known to me. It might be used if the installer fails/crashes, to indicate what the installer was doing ...

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