All Questions
87
questions
1
vote
0
answers
81
views
Switching from Mac to Linux DE: Strategies for globally swapping <ctrl> modifier with <meta>? [closed]
I'm switching from MacOs to Linux and exploring several popular Desktop Environments like KDE Plasma, Gnome & Pantheon, etc.
I find that the MacOS convention of using the meta key (aka the command ...
2
votes
0
answers
118
views
How to source from stdout for both Linux and macOS?
On Linux I can do:
source <(cat .env | grep ANDROID_GRADLE_TASK)
But on macOS, this doesn't do anything (no error, and no source)
What can I use for macOS?
Is there a command that works both on ...
0
votes
1
answer
712
views
"echo $VAR | base64 -di > file" fail to execute on MacOS
On Linux I can do:
echo ${ANDROID_KEYSTORE} | base64 -di > android/keystores/staging.keystore
But on MacOS, the same commands gives:
base64: option requires an argument -- i
Usage: base64 [-hvDd] ...
0
votes
0
answers
313
views
Terminal opens with a command not found error
I checked the .bash_profile and .zprofile, but it is empty.
Also .bashrc or .zshrc do not exist in my home directory.
Terminal window
1
vote
0
answers
169
views
is there any way to install libgranite-dev on mac os?
I'm trying to get the elementary OS terminal working on mac. The installation process of this terminal is described here.
after downloading the folder with the code files and typing:
meson build --...
0
votes
1
answer
597
views
Open unity application via command line wih application's graphics off
On Unity documentation we can see there is a way to run a standalone player via command line without the graphics by typing -nographics
I'm using the following command on a mac terminal, but it is ...
2
votes
1
answer
488
views
Sort files by date added not modified
I am trying to open the last application that was added to the /Applications directory on MacOS.
For now, in order to find the latest app and open it, I run:
open -a "$(ls -t1 /Applications/ | head -...
0
votes
1
answer
390
views
Why was the “meta” key replaced on modern terminals?
I want to understand how the alt key behaves on terminals.
From some reading it appears that the "meta key" has been replaced on modern systems with sending Esc+ instead, why is that? What is the ...
0
votes
1
answer
149
views
should I get rid of mutiple git installations, if so how? (OS X)
I hope the title isn't confusing, but I seem to have accumulated a couple of different versions of git in various directories over the years. I'd like to clean it all up and just have one version, and ...
0
votes
1
answer
2k
views
What does this rm -r command do in following usecase on mac terminal?
First I'm directing to the destination folder by below command
cd /Users/myname/MyFolder/
Now I'm using below command here, what does this command will do?
rm -r ../build ../dist
rm command is for ...
0
votes
1
answer
176
views
Moving files to matching folders on linux command line
I would like to copy or move files in to matching folders.
these are my filenames:
1-filename-aa.txt
2-filename-aa.txt
3-filename-aa.txt
1-filename-bb.txt
2-filename-bb.txt
3-filename-bb.txt
these ...
0
votes
2
answers
99
views
Unusual prompt in the terminal
I have a really unusual prompt in my Unix terminal (I'm using macOS). It looks like this:
myUserName@Galaxy-A7-2016
I've never seen the @Galaxy-A7-2016 bit before and I'm worried someone might have ...
1
vote
1
answer
1k
views
Can you run a Python program using Nice in Mac Terminal?
I'm trying to assign a high priority level to a Python program as soon as it runs using Terminal. I'm thinking of syntax along the lines of:
sudo nice -n -20 pythonfile.py
This returns the error: ...
0
votes
1
answer
217
views
How do I open a document in split screen-full screen from the terminal?
I use a Mac and have been getting into navigating through the terminal as I prepare to switch to linux for good in the future. One annoyance I have come across, which I can't seem to figure out is how ...
3
votes
1
answer
884
views
On macOS why "ps" always shows session id as "0"
I noticed it when running ps on different terminal sessions...
I don't really understand why? Also, when killing the -zsh process, so the interactive login shell, I noticed every of its children are ...
2
votes
1
answer
3k
views
Long form command line flags in Terminal?
I hope this is the right place to ask this question. So basically, I'm currently combing through some of the more commonly used Terminal commands, and I find it really hard to remember the short form ...
1
vote
2
answers
639
views
Terminal will not allow SSH to Linux
I have a VPS that I have accessed using Terminal in the past. When I open Terminal I get
Last login: Tue Aug 29 04:02:48 on ttys002
Mac-mini:~ administator$
All of the articles I have been able to ...
0
votes
2
answers
1k
views
bash broken osx "[Process completed]"
I had an error in a script, which ran 'brew unlink bash'. I then started getting: Warning: bash already installed, it's just not linked
I tried
brew update && brew install bash
sudo bash -c ...
1
vote
1
answer
382
views
Output of du command
I have a folder and it is 16.91GB in size(I checked in Finder).
I tried to check the size by using du command.
So, I tried du -sh ~/folder and I got 16G.
I thought I will get the output in Bytes ...
0
votes
2
answers
1k
views
Can't access Linux server via SSH
I have a MacBook Air, version 10.12.1 (Sierra).
I have been thus far with Windows for the better part of the last 20 years and few days ago I switched to Mac for the first time.
I have a shared ...
0
votes
2
answers
5k
views
are we able to clear mysql terminal (not just clear but totally clean)?
I know that there are command such as \! clear, system clear, using ctrl + l in terminal to clear the terminal.
But I realize by clear, it's just leaving a gap and all previous results are still at ...
17
votes
3
answers
22k
views
How to force ls terminal command to show results in Bytes while I have set the default to ls -h in bash profile?
I am following the snippet here to improve my terminal command in Mac OSX.
It sets the default value of ls results to human-readable by exporting alias ls='ls -GFh' to bash profile file. This is very ...
1
vote
0
answers
356
views
How can I correct two-finger scrolling on a Linux VM under OSX?
An earlier poster posted some of my concern at https://apple.stackexchange.com/questions/235029/in-terminal-how-to-exit-the-two-fingers-history-scrolling-mode, and I am grateful; I now know how to get ...
0
votes
1
answer
773
views
Why does terminal repeat "//: is a directory" after I source .bash_profile?
Sergios-MBP:~ home$ nano ~/.bash_profile
Sergios-MBP:~ home$ source ~/.bash_profile
-bash: //: is a directory
-bash: //: is a directory
-bash: //: is a directory
-bash: //: is a directory
-bash: //: ...
1
vote
1
answer
4k
views
What does a question mark after the file name mean using ls terminal command?
What does a question mark after the file name mean using ls terminal command?
I am using a Mac running OS X Yosemite (v.10.10.5)
When I do ls command at terminal, I get back a list of files (the same ...
1
vote
1
answer
3k
views
Terminal: How to list current directory while typing out a path
I'm not sure how to phrase this correctly but I want to know how in the terminal to do the equivalent of 'ls' when typing out a path.
So for example i'm typing in:
sudo "/Library/Application\ ...
0
votes
1
answer
1k
views
Alias command from terminal that opens a new terminal on a specific folder
I have this command already working in my .bash_profile:
alias mysite='cd /Applications/sites/mysite;pwd; php artisan serve --port=9000 | open http://localhost:9000 | open -a Finder ./'
So it:
CD's ...
0
votes
1
answer
1k
views
Needing to open OS X bash script as via launchd IN a terminal window
I've got a lengthy and complex bash script which works OK, but I'm trying to automate my deployment process and I'm flummoxed at this point.
I can get the script to run as a LaunchAgent no problem, ...
1
vote
1
answer
232
views
Why does CTL-3/CTL-# equal CTL-[? (and others) in the case of ASCII control characters
I've been rediscovering ASCII control characters as I fiddled with some terminal emulation code, and wrote a small program that outputs the hex value of each key I press (tcsetattr() with ~ICANON).
...
1
vote
0
answers
564
views
How come I have to `source ~/.profile` every time I launch a new terminal?
When I launch my terminal and I do
node --version
I get 2. w/e
Then I try to do nvm use 5.3.0 and it says nvm: command not found
So then I have to
source ~/.profile
Then I can use the nvm ...
0
votes
1
answer
506
views
ssh port forwarding through a pseudo terminal
Here's a situation:
I do all my work on a Mac.
There's a certain linux server 'server01' that provides access to
another linux server 'server02' via a pseudo terminal
So, to ssh into '...
0
votes
2
answers
6k
views
No entry for terminal type when SSHing into a router?
I’m trying to SSH/Telnet to my home router (Zyxel P-2812HNU-F1).
I know the router host and IP address. Also the administrator login credentials.
I’ve set ssh to port 2222 and telnet to 2323.
When ...
2
votes
2
answers
2k
views
Does it matter how many spaces exist in terminal commands?
For those of us humans trying to learn terminal languages and codes, does it matter how many spaces are or are not included in the commands and scripts of various languages? For instance, is there any ...
7
votes
3
answers
2k
views
show man pages in terminal without a pager
man defaults to using a pager. For short pages, I want to just echo them to the terminal without paging. I'm on OS X. Things I've tried:
man -t man #produces PostScript output
man ...
1
vote
3
answers
5k
views
How to list only files of a certain type in terminal?
How I can list all files of a certain type in a directory?
For example, if I want to see all MP3 files in the current folder, what do I do?
0
votes
1
answer
777
views
CR versus LF: which should I recognize as "end of line" in terminal program? [closed]
I understand the use of line feed and/or carriage return as line separators in Windows, Macintosh and Linux. But now I'm writing a program that will accept text user input over a TCP socket, and I ...
0
votes
1
answer
273
views
Key codes: xterm vs. Terminal.app
I mostly use iTerm, and it lets you customize the key codes sent to your terminal by individual keys. It has a couple presets labeled xterm Defaults and Terminal.app Compatibility. I'd like to make my ...
8
votes
3
answers
571
views
How to have a better view when typing out directories in terminal?
I am currently using a Mac and learning to use the terminal, but the question applies to Linux systems as well.
I would like to ask, when typing out paths in the terminal/command line, is there a way ...
2
votes
3
answers
10k
views
How to switch between command-line and GUI in VM on a Mac?
I have installed CentOS 7.1 in VMware Fusion of my Mac. I logged into the terminal (default runlevel 3) and started the GUI using the command "startx". I want to switch back to the terminal.
Ctrl+Alt+...
4
votes
3
answers
478
views
Prevent fork bomb when using interactive commands (like script) in .bashrc
I've often wanted to log the output of Terminal. So I tried to set script to run at startup; in my .bashrc file I put:
script ~/Logs/$(date "+%Y-%m-%d.%H-%M-%S")
Because the commands in my .bashrc ...
0
votes
1
answer
50
views
colorize files on MacBook terminal
I have a dedicated remote Linux server, and was able to add this code to my ~/.bashrc file:
alias ls='ls --color'
LS_COLORS='di=34:fi=0:ln=36:pi=5:so=5:bd=5:cd=5:or=31:mi=0:ex=35:*.rpm=90'
export ...
4
votes
2
answers
3k
views
Is it possible to highlight text with the keyboard only?
I know you can highlight text with the mouse, but can this be done in a terminal on Linux/MacOSX with the keyboard only? I've tried using shift and other commands with the arrow keys to no avail.
Is ...
1
vote
1
answer
964
views
Terminal new window always shows -bash: Searching: command not found
When open terminal, it always shows -bash: Searching: command not found. It does not affect other functions, just each time, even though open a new terminal window, it still pops up at the top of the ...
12
votes
3
answers
33k
views
What is the difference between terminal and bash? [duplicate]
When I open Terminal Window in Mac OS X, I can type bash and hit enter and I will see:
Last login: Fri Feb 20 14:30:56 on ttys000
Korays-MacBook-Pro:~ koraytugay$ bash
bash-3.2$
I can for example ...
0
votes
2
answers
2k
views
Strange Vim/terminal use from ssh via Mac OSX
I am using terminal from a Mac OS X 10.10 (Yosemite) and SSH’ing into a fedora machine and am having a couple strange issues with the terminal:
When I :q from vim, the contents of the vim screen is ...
3
votes
2
answers
11k
views
Sourcing ~/.bashrc in ~/.profile?
I'm quite new to developing under OSX and assigned some aliases and other preferences in the ~/.profile initially, however it got quite big and messy after a while because I had a lot of Environment ...
1
vote
1
answer
3k
views
Can I convert the font and SVG to base64 via offline OS X and Linux terminals?
I know how and I can convert the images to base64 via OS X and Linux terminals.
But I'm not sure if I can convert the fonts and the SVGs to base64 via offline OS X and Linux terminals.
I don't know ...
2
votes
1
answer
4k
views
mac how to run a command in a different tab/window of a terminal
In Windows, I can run any program from the command prompt by typing
c:> start startup.sh
and windows will run the startup.sh in a different command prompt(terminal) window.
How can I do the same ...
3
votes
3
answers
20k
views
Howto start an application remotely, so that GUI is shown locally
This is a beginners question, I know... but I have searched and I'm getting frustrated. I know my way around Lunux pretty well, but I have never had to deal with XServer.
Question 1:
I SSH from OSX ...
28
votes
7
answers
111k
views
What is the terminal command other than ctrl + c to exit a running Node.js program in a macOS?
In Linux terminal if I run a command like:
$ node httserver.js
The command runs and by doing ctrl + c the program is terminated and new line comes in terminal for us to enter a command.
I felt ctrl ...