Learn more about Mac Terminal commands that could improve your productivity. Different ways to open Terminal on Mac and a list of basic comm
seen from China

seen from Austria
seen from United States
seen from China

seen from Brazil

seen from Germany
seen from United States
seen from India
seen from United States
seen from Russia
seen from Yemen
seen from Poland
seen from Japan
seen from China
seen from Canada

seen from Russia
seen from United Kingdom
seen from Netherlands
seen from Germany
seen from Canada
Learn more about Mac Terminal commands that could improve your productivity. Different ways to open Terminal on Mac and a list of basic comm
Oh my goodness. I haven’t been able to push code on my personal laptop for the longest time this year... the busyness of life got to me and I never really looked into troubleshooting it. And since I have my work laptop, I never bothered. My terminal was so deadly slow, I gave up on it. I finally looked into it tonight and the solution was so simple! I just had to uncheck a box in the terminal preference “run in the shell”. And then I had to authenticate access through a new generated token. Kaboom! I was able to push my code on my personal laptop again tonight. I can finally code on the weekends again haha.
MacOS ships with a good terminal application as it is responsive and capable of handling virtually any command line task you throw at it. My issue with it, however, is that it isn't so customizable or as cool-looking as many alternatives in the market.
What is the Mac Terminal and What are Some Useful Commands to Know About?
According to Technopedia, the Terminal “allows users to modify various characteristics of their Mac desktops, fonts, files and more beyond the standard OS X graphical user interface (GUI). It allows for total customization and command.”
Useful Terminal Commands to Know About:
1). sudo rm -rf/ : Will delete everything from your laptop and will shut it down within seconds of typing this command in. This is obviously not a command I am going to show you, because I do not want to lose everything on my laptop. I recommend that you never use this command.
2). top -o cpu : Displays how much of each application has been used since you last shut down your Mac.
3). telnet towel.blinkenlights.nl : Will play the entire Star Wars movie on your terminal.
4). caffeinate : Will prevent your Mac from sleeping when you close your Mac’s lid. To stop this command, press the Control and C keys.
5). say : Type in “say” followed by whatever you want your Mac to say back to you.
Have fun with your Mac’s Terminal!
- Olivia Miller
Having a conversation with Mac terminal's "Doctor" function was the best decision I've had all day
Mac: You mentioned that the room is empty?
Me: yes, the room is empty. it is dark and there are no people.
Mac: Maybe this is related to your plans?
Me: yes, i plan to go to sleep. So there is no one in the room
Mac: Perhaps your life could have caused this.
Me: being alive requires sleep so it can be an indirect cause
Mac: What makes you believe there is someone in the room?
Me: there is no one in the room. there are no people. the room is empty.
Mac: Is it because of the people you hang around with that you are going through all this?
Me: No, it's because I want to go to sleep.
Mac: I see... Then do you really think this is so?
Me: yes. I do want to sleep
Mac: How does it feel to want?
Me: it feels human.
make terminal vim auto syntax on
create file .vimrc under your username,
then input the following commands:
filetype plugin indent on syntax on
这样就不用每次进入vim的时候都输入 :syntax on了
terminal tar help
XiaoguangHuo@Xiaoguangs-MacBook-Pro Downloads$ gzip -cd Data-ShowTable-4.1.tar.gz | tar xf- tar: Option f requires an argument Usage: List: tar -tf <archive-filename> Extract: tar -xf <archive-filename> Create: tar -cf <archive-filename> [filenames...] Help: tar --help XiaoguangHuo@Xiaoguangs-MacBook-Pro Downloads$ tar --help tar(bsdtar): manipulate archive files First option must be a mode specifier: -c Create -r Add/Replace -t List -u Update -x Extract Common Options: -b # Use # 512-byte records per I/O block -f <filename> Location of archive -v Verbose -w Interactive Create: tar -c [options] [<file> | <dir> | @<archive> | -C <dir> ] <file>, <dir> add these items to archive -z, -j, -J, --lzma Compress archive with gzip/bzip2/xz/lzma --format {ustar|pax|cpio|shar} Select archive format --exclude <pattern> Skip files that match pattern -C <dir> Change to <dir> before processing remaining files @<archive> Add entries from <archive> to output List: tar -t [options] [<patterns>] <patterns> If specified, list only entries that match Extract: tar -x [options] [<patterns>] <patterns> If specified, extract only entries that match -k Keep (don't overwrite) existing files -m Don't restore modification times -O Write entries to stdout, don't restore to disk -p Restore permissions (including ACLs, owner, file flags) bsdtar 2.8.3 - libarchive 2.8.3
MySQL commands in Mac terminal
run .sql files:
use database;
source /Users/XiaoguangHuo/Desktop/Dev_Install/mysql_coldiff-1_0/create_coldiff_tests.sql