5
votes
1answer
349 views

How can I open a file in its default application from the command line in OS X?

How can I open a file in its default application from the command line? For example if I have a file foo.doc, can I type command ./foo.doc into the CLI and have that file open in Word? Note: on my ...
5
votes
1answer
2k views

Why is a command line change to ~/Library/Preferences/com.apple.LaunchServices.plist not effective immediately?

When the Info window of Finder is used to associate files of a particular type with an application: the preference is effective immediately. When Terminal is used to make a comparable addition ...
4
votes
2answers
4k views

How to change the creation (st_birthtime) date/time of a file in Lion?

touch(1) can only change modification and access times, but has no options for creation time. This does not work, at least not on Lion. So how do I change the creation time, also referred to as ...
2
votes
2answers
234 views

How to investigate fragmentation of one file?

I'd like to see if one of my file is "all over the place", ie fragmented in little pieces at different locations on my hard drive. I'm not looking for a software like iDefrag but rather a command ...
1
vote
2answers
585 views

How do you list items with and without labels from the terminal?

Is there a command that can tell the label status (labels as applied in the info menu in the finder cmd+i) of an item from the command-line in OS X? Essentially, I just want to list all the items with ...
10
votes
3answers
1k views

What is the “+” mark at the end of file description?

When I execute 'ls -al~', I see + marks, and it prevents me from moving/deleting files. drwxr-xr-x+ 5 prosseek admin 170 Oct 5 03:43 Desktop drwxr-xr-x+ 17 prosseek admin 578 Sep 25 ...
11
votes
2answers
4k views

What is the difference between .command, .tool, and .sh file extensions?

I saw a couple of questions about executing command line scripts? I saw that the .command and .tool extensions were mentioned. I have always used .sh. What is the difference between these different ...
3
votes
2answers
497 views

How do I set the creation time of a file?

I have a script that converts a file to another format, and I want the resulting file to have the same timestamps as the original, including the creation time (as shown by ls -lU). I can use touch to ...
6
votes
1answer
5k views

What command combo at terminal will output a list of directories with human-readable sizes?

I'd like to open Terminal.app and enter a command like: my-macbook-pro:~ my-username$ ls -lh Instead of seeing the size of the folders in bytes that are in my current working directory, I'd like to ...