Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions tagged [terminal]

Questions about the Terminal application or its terminal emulation should use this tag. Use **command-line** for questions about shells or command-line programs that do not specifically involve Terminal.

-2
votes
1answer
5 views

Accessing Gmail From Terminal

Is there a way to access my Gmail smtp account just using the terminal or is this not possible? I saw this link but it did not help: https://medium.com/@stessyco/gmail-from-the-command-line-with-...
1
vote
0answers
19 views

Bracketed Paste Mode in Terminal.app?

Does Terminal.app support "bracketed paste mode"? This mode inserts an escape sequence when pasting so that (e.g.) editors can handle pasted text differently from typed text. http://www.xfree86.org/...
0
votes
0answers
22 views

Terminal Startup command not found

Whenever I open my terminal there is a line that reads, -bash: 6ee67d3f2005ceaf5266c966198b7f3c165bf5d7: command not found This is shown after the line that states my last login information. I am ...
1
vote
2answers
33 views

Where are Wi-Fi passwords stored?

Are encrypted Wi-Fi passwords stored in /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist? If yes, which string? I know we can view wireless passwords using the Keychain ...
0
votes
1answer
27 views

Can we capture a screenshot of vim window using Terminal?

Let's say I have a file called hello.py. # File: ~/hello.py print('Hello') print('Stack Exchange') I would like to get a screencapture of hello.py when opened in vim editor as the ~/hello.png. Need ...
0
votes
2answers
169 views

Searching Internet from Terminal

Is it possible to search the internet from the terminal. For instance, could i write some command followed by say https://github.com and it will automatically open a browser with that site through the ...
1
vote
1answer
71 views

Find, select and move/copy multiple files at once via Terminal

I looked for relevant posts extensively before writing but I apologise if it has been already asked and solved. I'd need to find, select and move/copy some files from a folder starting from a list in ...
0
votes
0answers
12 views

Any log in macOS to get the last usage of a Mac (logged in and the screen unlocked)?

I'll formulate this question that's been nagging me for a long time as best as I can. OK, so...I'd like to know when was the last time the Mac was last used, meaning: what's the last time the mac was ...
0
votes
1answer
27 views

Refreshing files without killall Finder?

I would like to have a file list refresh in a Folder (like after switching between YES/NO in hidden files option). The only way I found is killall Finder which is fine, but it causes the screen to ...
1
vote
1answer
25 views

Changes in terminal are not displayed in finder and other programs

I am a new Mac user. Recently I've noticed that the changes that I make in terminal, e.g. moving files, creating new ones and removing are not displayed in finder and other softwares - its like I am ...
0
votes
0answers
20 views

Ergonomically what could be the best key to map to Esc key (touch bar) [closed]

I started to work on a MacBook Pro 2018 with a touch bar, but I am struggling too much trying to adapt to the Esc key. I currently have caps lock map to control and thinking on probably maping the ...
2
votes
0answers
19 views

Rearrange Spaces via command line from the terminal emulator

TL;DR: I need to replace the dashboard with a terminal emulator. Hi. I need to 'rearrange spaces' so a terminal emulator gets first from the left before the desktop, where the dashboard used to be. ...
1
vote
2answers
27 views

Why does my symbolic link not work?

I wrote a small Julia program: println("Hello world!") I can run Julia from the Terminal: $ /Applications/Julia-0.6.app/Contents/Resources/julia/bin/julia test.jl Hello world! To make my life ...
1
vote
1answer
30 views

Automatic capitalization when typing terminal commands

Recently when I use the terminal and I type a command, I hear a click and whatever I had typed becomes capitalized. If I'm typing ls -lrt I'll hear a loud click and when I look at my command it has ...
1
vote
1answer
44 views

Getting file path of latest added file in a folder - Mac OS 10.9

As learned from google and sister stack sites, this is the working solution I've come up with for getting the path of latest added file in a folder. But this is not giving the accurate result. I'm ...
1
vote
1answer
29 views

Find all folders with rwx permissions for a certain user?

How do I find all the folders that have rwx permissions for a certain user? Preferably no admin, can use shell scripts, Terminal, Python 3.6.
1
vote
0answers
17 views

Convert MS Word DOC and DOCX file to RTF keeping modification date

I've got a folder full of about 2000 MS Word (DOC and DOCX) files that I need to do complex searches in -- for example, finding documents that contain John but not John Doe. Or 21,000 but not 21,000,...
1
vote
1answer
23 views

Sudo command no longer functions properly

When I use the sudo command I get an error message. sudo: /etc/sudoers is world writable sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin If I try to use chmod ...
0
votes
1answer
17 views

change /etc/localtime to UTC time?

I noticed it is common for programming languages to utilize /etc/localtime when determining the current time to display for a user. In particular, I know that Ruby relies on /etc/localtime if the "TZ" ...
0
votes
0answers
20 views

Using ScreenSaverEngine with -background flag, does not open it in background

I have used this guide on Medium to use the screensaver as wallpaper. I just got a new iMac at work with macOS v10.13.6. and was intending to do the same. But running the command in terminal with -...
0
votes
1answer
13 views

iTerm Double Click Text Selection

I recently installed iTerm on both my Mac Pro & MacBook Pro and the text selection behavior is different on both the machines. Consider the following line in terminal: /Users/user/basic/...
3
votes
4answers
107 views

How can I find the “friendly name” of the operating system from the shell / Terminal / bash?

I know that I can use sw_ver to find this information: ProductName: Mac OS X ProductVersion: 10.14 BuildVersion: 18A353d …and I know I can find other things like uname can give me some types of ...
0
votes
1answer
23 views

How to open a URL with Terminal through applescript by using mpg123?

I need to use mac terminal to open an audio stream from a URL through an applescript. I know that mac terminal is already equipped with afplay, but that only plays a file which is available on your ...
0
votes
0answers
30 views

Command to change volume of specific device

I need a command to change my audio device's volume. I want to simulate the hardware volume keys from the terminal. I'd been using this command to decrease the output volume: osascript -e 'set ...
0
votes
0answers
10 views

alternatives to keychain for storing keys on shared/managed device

I need to work on a shared/managed apple device (same user), but need to frequently use ssh, git or gnupg. I would like to prevent my keys to be stored on the device keychain besides probably being ...
4
votes
2answers
108 views

How to implement text editing features in terminal interface?

Sorry if the title is confusing but essentially what I want is to have standard text editor features like Command< to move to the beginning of the line or CommandShiftBackspace to erase a line. Is ...
1
vote
0answers
28 views

mdls returns `(null)`

function ls-by-added() { # Doesn't work well for files having '(null)' as their DateAdded, which some do. mdls -name kMDItemFSName -name kMDItemDateAdded -raw -- *(D) | \ xargs -0 -I {}...
2
votes
3answers
140 views

Trim escape characters from file path

I generate file paths for use in emails by dragging the folder/file in question into Terminal.app then copying & pasting the generated text into an email text. The copied path with escape ...
0
votes
1answer
19 views

Is there a way to set Sound Balance permanently for MacBook?

My left speaker of Macbook pro is producing a bit muffled sound. So I have turned the Sound Balance setting in System Preferences towards midway through right speaker, and it's no longer noticeable. ...
2
votes
2answers
260 views

How to use a pipe in a script optionally

How can I achieve the conditional usage of a pipe for a command execution in a script. It looks like this #!/bin/bash XCPRETTY=" | xcpretty" if [ $(which xcpretty | wc -l) == 0 ]; then XCPRETTY="...
2
votes
1answer
65 views

Why my MacBook Air terminal uses sh-3.2# instead of my username#?

In my MacBook Air Terminal, I have the following prompt: Zoos-MacBook-Air:~ zdm$ When I type sudo su and then enter my root password, I usually get the same prompt with the # sign as follows: Zoos-...
1
vote
0answers
18 views

How to export the Preview Contents of Spotlight search results?

The notes I had on my local computer have recently vanished. I tried converting the files found in the "Notes backup" location to HTML as suggested by this site but that only yielded 1 useful note. I ...
0
votes
1answer
29 views

nvram command not found

When attempting to check the change the contents of the nvram (adding bootup chime, etc.), I am continually returned with the error: nvram: command not found. This occurs even when I attempt to just ...
0
votes
1answer
22 views

Finding minimized apps through terminal

I would like to know how to find what apps are minimized in the dock but through the terminal? The idea is to make a script that pauses minimized apps in order to reduce memory usage but the first ...
1
vote
1answer
25 views

Mouse scroll stopped working with Less in Terminal

For a few years now, Terminal.app in MacOS has supported mouse-scrolling with the less program, but today I noticed that it is no longer accepting mouse scrolls, and only works with the Up and Down ...
0
votes
0answers
15 views

Make iTerm2 read profile from file, from the CLI?

I want to make iTerm have these values set: - Load preferences from a custom folder or URL - Save changes to folder when iTerm quits And I want to set them from a CLI command (no GUI, no clicks). ...
2
votes
1answer
22 views

How to get synthesized disk root device from shell?

I have quite a few volumes (over 10) on a machine and I need to ascertain the parent volume of synthesized volumes for APFS drives. If you execute diskutil list you get a list of volumes, but this ...
0
votes
1answer
42 views

Each of my Time Machine backup is over 100MB

And when I run tmutil compare in the terminal, RIGHT after the latest backup is complete, it just start spitting every single file in my system: ! (xattrs) /.vol ! 8.0K (...
0
votes
1answer
24 views

Cron mail notifies error of suspicious unknown script

Thanks to the mail function of the Terminal it came to my attention that there was some kind of cron job being executed with some errors. The mail of the cron gives this info: 2018-08-02 23:47:22....
0
votes
0answers
17 views

Using `defaults` through ssh: “Domain com.apple.dt.Xcode does not exist”

I'm trying to automate a build process, and as part of making things robust, I need to set some values with the defaults application. When I'm logged in locally using a terminal on the graphical ...
1
vote
0answers
30 views

Terminal redraws characters incorrectly when editing previous lines

Some times when using Terminal in macOS 10.12.6, and going UP to edit previous lines, and cursoring LEFT/RIGHT, Terminal redraws the characters incorrectly. Specifically, it redraws the character 2-3-...
0
votes
0answers
28 views

Can you disable su for certain users logged in via ssh?

Basically, I'm running a Mac Mini as a server, and I'm trying to close some security holes. My server has 3 users: admin, git, and server. Each user has public key authentication enabled, while only ...
0
votes
0answers
11 views

Connect old data doubled drive to new Mac

I had a 2012 MBP with data doubler instead of the superdrive. My 2012 died and I bought a 2016 MBP. I removed the drive from my old 2012 to get some data from it but I can't mount it. Here is a ...
0
votes
1answer
13 views

Terminal tab number shortcuts completely messed in High Sierra

I use tabs in terminal.app quite a lot, and often close and open new tabs as I run different tasks. I'm very used to switching through tabs using the same shortcut as I use in Chrome and textmate, ...
1
vote
2answers
63 views

Terminal timing out with wget

I am using Terminal to wget images from a list of urls in a text file, using the command: wget -i septweetsimages.csv. When the operation hits url and can't connect to its server, Terminal continues ...
0
votes
0answers
42 views

Terminal command to force-install Mac OS High Sierra onto a specified drive?

I'm wondering if there is a way to install Mac OS High Sierra using terminal onto a specified drive? I'm working with a bit of a unique situation as I've been running Mac OS Sierra successfully in a ...
1
vote
0answers
33 views

Python quit unexpectedly when running Python programs from terminal

I am using Terminal to run code on my macOS High Sierra. I use Python all the time on my laptop (all day every day) and this is the first time I have seen this and it's come somewhat suddenly. I haven'...
1
vote
1answer
25 views

Time Capsule/Time Machine volume slow to process with tmutil

My 2TB Time Capsule has functioned as our home router and backup device for years. It's not very fast at backing up over network, but since this is a passive activity it's never been a problem. I ...
0
votes
1answer
18 views

terminal: ERROR cannot verify www.important_website certificate, issued by ‘CN=DigiCert SHA2 Secure Server CA,O=DigiCert Inc,C=US’:

I am installing a large amount of files with wget and all of a sudden I get the error message: cannot verify www.ncei.noaa.gov's certificate, issued by ‘CN=DigiCert SHA2 Secure Server CA,O=DigiCert ...
1
vote
0answers
38 views

What is the equivalent of these Linux IPTABLES lines for macOS High Sierra?

I am working for fun on a DOSBOX experiment to get Windows 3.11 WFG to connect to the internet through PPP and Trumpet Winsock. So far, with this script (https://github.com/knightmare2600/oldschool/...