Linux equivalent of the Mac OS X open command
You could try xdg-open
, most Linux distros have it. It will open default associated app for your file.
FYI https://portland.freedesktop.org/doc/xdg-open.html
Linux equivalent of OS X's /usr/bin/open
Solution found that launches the .desktop file with the custom icon it used. I couldn't get xdg-open
to work on i, no clue why.
https://askubuntu.com/questions/591736/any-c-functions-to-simulate-double-click-on-file/592439
Windows cygwin equivalent of Mac OS X open command
You seem to have missed this one:
Open a file from Cygwin
Windows equivalent of the Mac OS X “open” command
The closest thing available is start
.
If its first argument is double-quoted, that argument is treated as a window title rather than a filename. Thus, to use it robustly, add an empty string as the first argument:
start "" "my filename.foo"
Thank you to @Holger for pointing this out!
locate Linux command alternative for mac OSX
I guess the mdfind
command is what your are looking for:
mdfind -name test.pdf
OS X: equivalent of Linux's wget
I'm going to have to say curl http://127.0.0.1:8000 -o outfile
What are the differences between using the terminal on a mac vs linux?
If you did a new or clean install of OS X version 10.3 or more recent, the default user terminal shell is bash.
Bash is essentially an enhanced and GNU freeware version of the original Bourne shell, sh. If you have previous experience with bash (often the default on GNU/Linux installations), this makes the OS X command-line experience familiar, otherwise consider switching your shell either to tcsh or to zsh, as some find these more user-friendly.
If you upgraded from or use OS X version 10.2.x, 10.1.x or 10.0.x, the default user shell is tcsh, an enhanced version of csh('c-shell'). Early implementations were a bit buggy and the programming syntax a bit weird so it developed a bad rap.
There are still some fundamental differences between mac and linux as Gordon Davisson so aptly lists, for example no useradd
on Mac and ifconfig
works differently.
The following table is useful for knowing the various unix shells.
sh The original Bourne shell Present on every unix system
ksh Original Korn shell Richer shell programming environment than sh
csh Original C-shell C-like syntax; early versions buggy
tcsh Enhanced C-shell User-friendly and less buggy csh implementation
bash GNU Bourne-again shell Enhanced and free sh implementation
zsh Z shell Enhanced, user-friendly ksh-like shell
You may also find these guides helpful:
http://homepage.mac.com/rgriff/files/TerminalBasics.pdf
http://guides.macrumors.com/Terminal
http://www.ofb.biz/safari/article/476.html
On a final note, I am on Linux (Ubuntu 11) and Mac osX so I use bash and the thing I like the most is customizing the .bashrc (source'd from .bash_profile
on OSX) file with aliases, some examples below.
I now placed all my aliases in a separate .bash_aliases file and include it with:
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
in the .bashrc or .bash_profile file.
Note that this is an example of a mac-linux difference because on a Mac you can't have the --color=auto
. The first time I did this (without knowing) I redefined ls
to be invalid which was a bit alarming until I removed --auto-color
!
You may also find https://unix.stackexchange.com/q/127799/10043 useful
# ~/.bash_aliases
# ls variants
#alias l='ls -CF'
alias la='ls -A'
alias l='ls -alFtr'
alias lsd='ls -d .*'
# Various
alias h='history | tail'
alias hg='history | grep'
alias mv='mv -i'
alias zap='rm -i'
# One letter quickies:
alias p='pwd'
alias x='exit'
alias {ack,ak}='ack-grep'
# Directories
alias s='cd ..'
alias play='cd ~/play/'
# Rails
alias src='script/rails console'
alias srs='script/rails server'
alias raked='rake db:drop db:create db:migrate db:seed'
alias rvm-restart='source '\''/home/durrantm/.rvm/scripts/rvm'\'''
alias rrg='rake routes | grep '
alias rspecd='rspec --drb '
#
# DropBox - syncd
WORKBASE="~/Dropbox/97_2012/work"
alias work="cd $WORKBASE"
alias code="cd $WORKBASE/ror/code"
#
# DropNot - NOT syncd !
WORKBASE_GIT="~/Dropnot"
alias {dropnot,not}="cd $WORKBASE_GIT"
alias {webs,ww}="cd $WORKBASE_GIT/webs"
alias {setups,docs}="cd $WORKBASE_GIT/setups_and_docs"
alias {linker,lnk}="cd $WORKBASE_GIT/webs/rails_v3/linker"
#
# git
alias {gsta,gst}='git status'
# Warning: gst conflicts with gnu-smalltalk (when used).
alias {gbra,gb}='git branch'
alias {gco,go}='git checkout'
alias {gcob,gob}='git checkout -b '
alias {gadd,ga}='git add '
alias {gcom,gc}='git commit'
alias {gpul,gl}='git pull '
alias {gpus,gh}='git push '
alias glom='git pull origin master'
alias ghom='git push origin master'
alias gg='git grep '
#
# vim
alias v='vim'
#
# tmux
alias {ton,tn}='tmux set -g mode-mouse on'
alias {tof,tf}='tmux set -g mode-mouse off'
#
# dmc
alias {dmc,dm}='cd ~/Dropnot/webs/rails_v3/dmc/'
alias wf='cd ~/Dropnot/webs/rails_v3/dmc/dmWorkflow'
alias ws='cd ~/Dropnot/webs/rails_v3/dmc/dmStaffing'
Command to open Sublime from OSX terminal
You can also create a symbolic link to Sublime Text to launch it from the terminal with a simple command like "sublime path":
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime
You should change the installation path accordingly. It's also possible to use any other alias than sublime, but it's best to be explicit.
Related Topics
Converting Jiffies to Milli Seconds
How to Attach a File Using Mail Command on Linux
Piping Text to an External Program Appends a Trailing Newline
Multiple Websites on Nginx & Sites-Available
How to Filter Out All Unique Lines in a File
Nginx Redirect Url with Query Strings
Why Doesn't "Total" from Ls -L Add Up to Total File Sizes Listed
Differencebetween Buffer and Cache Memory in Linux
Best Way to Find Os Name and Version in Unix/Linux Platform
How to Find the Java Sdk in Linux After Installing It
Run Script with Rc.Local: Script Works, But Not at Boot
Linux Command: How to 'Find' Only Text Files
Using 'Date' Command to Get Previous, Current and Next Month
Send Mail from Linux Terminal in One Line
How Does Vi Restore Terminal Content After Quitting It