Stack Exchange Network

Stack Exchange network consists of 175 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

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.

1
vote
0answers
34 views

cp command: Overwrite confirmation with file diff

When running cp command to copy files, I would like to be prompted for overwrite confirmation, and, if possible, view the file diff confirming. Is this possible? And if yes, how? Ideal example: $ ...
3
votes
1answer
2k views

What is the “ls” directory in my home directory?

I was just exploring the directory structure on my Mac and there's a directory in my root/home directory, named ls. [~]$ ls -l . . . drwxr-xr-x 6 XXXX staff 192 Dec 8 2018 ls [~/ls]$ pwd /...
2
votes
1answer
69 views

Automatically open a terminal window and run a command, robustly

I am looking for a way to automatically open a new window of Terminal.app and run a command in it. I used to do this with AppleScript, in a way similar to this: tell application "Terminal" do ...
1
vote
1answer
17 views

Get french accent on Linux terminal connected via ssh from MacOS High Sierra

I come on this forum since no answers or suggestions on other forums. I am often connecting from a MacOS High Sierra terminal via SSH to a Debian 8.0. The locales on my MacOS are : LANG= LC_COLLATE="...
1
vote
1answer
17 views

Bash History missing from Terminal

After an OS update, my bash history is suddenly gone - typing "history" at a terminal window (sudo or standard) yields only the commands entered after the upgrade. What could have happened here?
0
votes
1answer
42 views

Prevent Terminal from overwriting preferences on exit

When a user loads my C++ program, I want Terminal to look a certain way. I solved this by wrapping my program in an AppleScript .app which overwrites ~/Library/Preferences/com.apple.Terminal.plist (...
2
votes
0answers
16 views

How to set default duration for new Calender events

When creating new calendar events in the Calendar application the duration of the event defaults to 60 min. In earlier version of macOS it apparently was possible to change this by running defaults ...
0
votes
1answer
35 views

Copy file from Terminal and paste in Mail

I would like to copy a file to the clipboard in terminal (as a reference like Finder does it) and then when writing an email, paste it into Mail as an attachment (CMD + V). I posted an example ...
0
votes
1answer
10 views

Pinning Apps to dock VIA terminal or installation arguments OS Sierra

I am using meraki MDM systems manager to deploy applications for are teachers. It would save me a-lot of heart ache to be able to include a terminal command or some type of software to help with ...
0
votes
2answers
40 views

Disk usage in Mac terminal not working with --max-depth

I want to see my disk usage for a specific folder with a pre-set maximum depth. On Linux, the command is $ du -h --max-depth 1 On macOS Mojave (10.14.5) with bash version 3.2.57(1)-release, this is ...
1
vote
2answers
31 views

Launch of terminal after system login takes around 60 sec, is there a way to speed it up?

Here is my .bash_profile export PYENV_ROOT="$HOME/.pyenv" export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "...
1
vote
2answers
51 views

Why does rm in zsh abort?

I have a number of files: > $ ls FleurInputSchema.xsd inp.xml out usage.json fort.77 juDFT_times.json out.xml and I would like to delete some of ...
0
votes
1answer
17 views

How to properly install freetype2 devel package?

I wish to install freetype 2 dev package so I can use the fontconvert tool in Adafruit-GFX-Library Here is what I get $make fontconvert fontconvert.c:22:10: fatal error: 'ft2build.h' file not found #...
0
votes
2answers
43 views

How can I type the pound/hash (#) symbol on a British keyboard when in Terminal?

I have 'Use option key as meta' set in Terminal keyboard settings. The 3 key makes the British pound symbol (£) when I tap it with SHIFT. This is a cruel joke. I want the real pound symbol (#). How ...
0
votes
0answers
24 views

How to disable guest browsing in chrome on Mac?

I am trying to disable guest browsing in Chrome. It's proving to be somewhat difficult. I have tried using terminal which I was able to disable incognito browser but failed trying to disable guest ...
40
votes
3answers
3k views

bash vs. zsh: What are the practical differences?

With the news that Catalina will default to zsh instead of bash, I'm finding lots of results telling me about the switch, and that it may cause problems with shell scripts, but I'm not familiar enough ...
0
votes
0answers
18 views

Does there exist a means to use Ranger in iTerm2 and Preview Images with X11 forwarding enabled on an SSH session?

So I am using the ranger terminal application, which is a vi style file browser. I've followed this tutorial to achieve image preview compatibility with the iTerm application. This works very well for ...
0
votes
0answers
13 views

Why does my terminal on a Macbook Pro say Thomass-Iphone? [duplicate]

My name is not Thomass nor do I know one however I have this going on in my terminal, how can I fix this?
1
vote
0answers
17 views

Removing garbish history from Terminal Remote Connection

When you press CMD+Shift+K on terminal, a Remote Connection window will appear, which allows you to save and manage your connections. When I was trying to add the correct ssh command, I had several ...
1
vote
0answers
4k views

How can I recover from a “AMD-Action:downloadProduct:SP” during installation of macOS?

Just wiped my hard drive on my MacBook Pro from 2013. Went to install a new copy of MacOS Sierra. I get the following error: AMD-Action:downloadProduct:SP I looked online and tried change the date ...
0
votes
1answer
33 views

Mac OS Mojave Terminal Resetting to Default Theme

I've recently worked out how to change my terminal theme and set the new theme as default through the GUI menu: Terminal > Preferences > Profiles > Default. This works and sets the current session to ...
0
votes
1answer
31 views

Mojave - disabling trackpad from terminal

I tried to disable trackpad on my MacBook Pro 2015 my operating system is Mac OS X Mojave there is not have Accessability menu in System properties. So, how to disable it from Terminal?
1
vote
0answers
28 views

updated os to mojave 10.14.5, now lsof is giving me errors with stat

I had a system update last Thursday and ever since I have been getting the errors below. I have tried reinstalling lsof via homebrew, upgrading bash, rebooting, but no luck. How do I even go about ...
2
votes
2answers
39 views

Apple Remote Desktop Shutdown

I am relatively new to Macs and their osascript syntax. I have a mac mini set up as a server and I am trying to use Apple Remote Desktop to send a command to one of the iMac workstations. When I send ...
1
vote
1answer
17 views

macOS: Terminal scrolls past file boundaries

When I have a file open in either the standard Terminal or iTerm2, I've noticed a weird problem. When I use the Trackpad to scroll through the file with two fingers, if I scroll to the top of the file ...
4
votes
3answers
305 views

Can't connect to Internet in bash using Mac OS

My browser works perfectly using the using Internet, however, when I tried to use this command in bash: ping -q -w1 -c1 google.com &>/dev/null && echo online || echo offline It gives ...
0
votes
1answer
21 views

Slow read performance in Mac OS X terminal, with external encryption enabled hard drive

Anyone experienced really slow performance with Mac OS Extended (Journaled, Encrypted) file systems? I have git LFS project on my hard drive and for some reason even as simple as cd project-folder ...
0
votes
0answers
18 views

Can't delete folder - operation not permitted [duplicate]

I try to delete the folders in my update directory /Library/Updates, because my updates are corrupt and are failing. I need them to get downloaded again. I tried it with the terminal like this sudo ...
1
vote
0answers
18 views

“sudoers is owned by uid 501, should be uid 0” message, but sudo works fine [duplicate]

Running Mojave on a MBP 2012 13" and I get that message every time I use the sudo command. It isn't preventing me to use sudo, but I get the feeling it'll bite me in the butt at some point in time, ...
0
votes
1answer
41 views

Finder opens Terminal when clicking on homedir icon

I have added an icon for my homedir to Finder. However, when I click on it, Terminal opens instead of the expected Finder view of $HOME. Is there some sort of file type or other metadata that has ...
0
votes
0answers
15 views

Forward deleting (Macports/bash): Is there an alternative to Fn+Delete and Control+D?

As a more general version to this question, is there a way to forward-delete in a bash terminal that doesn't involve Fn+Delete or Control+D? Motivation: When using the Macports port command ...
-2
votes
0answers
22 views

send pictures from macbook to iphone over usb command

from terminal how can i send a picture to an iPhone attached by USB? my macbook screen is broken I want to connect to wifi from my macbook though, and share the wifi to my phone (phone can't connect)...
2
votes
1answer
71 views

Rename file names in directory to creation timestamp with second precision

Is there an easy way to do this for files in a particular directory - to have their names be renamed to the file timestamp, with seconds level precision Clarification: For example, suppose a (Mac ...
0
votes
1answer
27 views

How to forward delete in Macports?

When using the interactive Macports shell (running port), is there a way to delete characters to the right of the cursor? Normally, you can simply use key the combination Fn + Delete to forward-...
0
votes
0answers
16 views

Add access to the macbook camera for the terminal application

I am trying to run a OpenCV tutorial that uses the cv.VideoCapture(0). This does require permission from terminal to access the camera. Here is a blog description showing that they see the terminal ...
0
votes
0answers
17 views

Mac OS terminal tab separate histories

Terminal gets bash to go through and elaborate dance to keep separate histories for each tab. Normally (for me anyway) after a restart of Mac OS these separate histories are lost and you are left ...
2
votes
0answers
35 views

Terminal commands are not being saved

I am on Mojave 10.14.4 and my terminal literally has 100 or so commands in its history when it should have ten times that. It seems as though it never saves the commands, whether I open the terminal ...
2
votes
0answers
32 views

Why can't I access files in my home directory? [closed]

I am running a terminal script that simply reads files and it will not read certain files with out an error. I have tried 3 things Using sudo - sudo node getInfo Setting macOS to allow terminal ...
2
votes
1answer
68 views

How to turn off “terminal would like to administer your computer” message?

I keep getting a warning message that terminal would like to administer my computer whenever I run standard commands, such as editing crontab in Vim. This never used to happen on my old Macbook. How ...
0
votes
1answer
42 views

Why isn't a binary not being found in my PATH?

I've got a Python project which uses a virtual environment. In my project folder, there is a bin/ folder which contains all the executables needed by the project. To use these, you run source bin/...
0
votes
1answer
65 views

if external disk found by terminal applescript

Hey so MacBooks have this nasty habit of not mounting external disks when plugged in before... reference link the solution is quite simple with terminal eject the disk and the manually unplug replug ...
0
votes
2answers
66 views

Connect and run commands over SSH using script

I'm using a series of commands for deploying my files to production. This is currently done manually. Is it possible to make these commands into an executable file? So that I don't have to copy paste ...
1
vote
1answer
25 views

How to execute an equivalent function of Xcode's Instruments > “File Activity” in shell?

I need to be able to show and capture the same output that Xcode.app/Contents/Applications/Instruments.app captures while in Terminal.app (in the shell). Is there a dtrace function / script, or some ...
7
votes
3answers
815 views

How to create an executable file for an AppleScript?

I want to create an executable file that when run will send a popup. I have the code for the popup osascript -e 'tell app "Finder" to display dialog "message"' but don't know how to create an ...
1
vote
1answer
36 views

Prevent Mac terminal from changing tabs when reopened

Whenever I open the terminal app after it was minimized, it often changes tab and go back to a particular tab (which tab in particular is not very important). Can someone suggest a workaround for this ...
2
votes
1answer
44 views

Is there a macOS ssh client that allows me to type fluid commands?

Terminal and iTerm uses whatever method they are using to ssh that basically slows down if the network connection to the server is slow. All the commands I type would show up on the screen seconds ...
0
votes
1answer
20 views

Can't store multiple arguments with read -p in macOS terminal using bash

I am trying to store words from an input as parameters with read -p as follows : read -p "Enter your command: " cmd arg1 arg2 echo "$cmd" echo "$arg1" echo "$arg2" With this, $cmd ...
1
vote
0answers
22 views

Separate zsh histories after restart (iTerm2)

I am running iTerm2 (v 3.2.9) and zsh (v 5.7.1). I normally have 3-4 iTerm tabs opened at the same time and each tab has its own history thanks to the following settings in my .zshrc file SAVEHIST=...
0
votes
0answers
17 views

Save Terminal app's multiple tabs' output with a single click?

If one has many many Terminal windows or tabs, is there a way save all of the app's tab's output with a single click or command instead of choosing the Shell > Export Text As option countless times to ...
0
votes
1answer
56 views

The command for alias local='…' gets run on terminal open

I have an alias set up in my .bash_profile file: alias local='npm run start-local', and for whatever reason when I open a new terminal session it is trying to run that command npm run start-local ...