All Questions
26
questions
1
vote
0
answers
1k
views
Is the macOS/Linux shell the same thing as Bash?
sorry if this is a silly question, but are there any differences between Bash and the macOS/Linux shell? (not all Linux distros use the Bash shell right?)
0
votes
0
answers
312
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
0
votes
1
answer
267
views
Command 'date +%W' does not return week 00
Manual page for date(1) says:
%W week number of year, with Monday as first day of week (00..53)
I assumed there exists a week number 00, and I handle such week in my program, but once I decided to ...
0
votes
1
answer
32
views
How can I sign in to my VPS/shell account without having to type my password each time?
How can I sign in to my VPS/shell account without having to type my password each time? I have tried pasting a shell script including Prolog code but the password doesn't paste properly.
3
votes
1
answer
269
views
Is it possible to sync directory between two computers without direct connection through small intermediate storage device?
I would like to one way synchronise big directory between two machines without direct connection. Either using some cloud storage (without computing power) connected to both machines or an ...
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 ...
0
votes
4
answers
2k
views
What's the difference between "-h" and "--help"? [closed]
Sometimes I see -h is a manual for a application, and sometimes I find --help in the manual.
What is the difference between them? Is there any history/story about this?
1
vote
1
answer
867
views
$("/usr/sbin/sysctl -n hw.memsize") No such file or directory
macOS High Sierra, 10.13.3 (17D102)
If I run in terminal sysctl -n hw.memsize it works fine, I get a number
If i run which sysctl i get /usr/sbin/sysctl which seems correct
How to run the same ...
3
votes
1
answer
880
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 ...
0
votes
1
answer
770
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: //: ...
9
votes
3
answers
77k
views
How to run a bash script via absolute path?
I have a file:
/Users/danylo.volokh/test/test_bash_script.sh
Content is very simple:
#!/usr/bin/env bash
echo "-- print from script"
I'm in folder "danylo.volokh"
This command runs fine:
Danilos-...
2
votes
1
answer
750
views
Is administrator account necessary in order to use shells such as zsh and fish?
I have a weird situation. I’m using Mac OS X 10.11 (El Capitan) and iTerm2.
Zsh is listed by default in /etc/shells as /bin/zsh, and this allows me to use Zsh without any issues on my standard ...
0
votes
3
answers
3k
views
Scroll through shell history based on command or stub/stem?
Please forgive my ignorance.... I have a history of commands in Bash on OS X and Linux. At times, I want to go back to an item based on the command. For example, suppose I previously entered:
make ...
2
votes
2
answers
3k
views
How to tell what are my startup files for sh or bash?
From this question I understand that depending on the operating system sh and bash behave differently.
Doing env and alias I can tell that:
Every time I open a OSX Terminal or run bash the variable $...
4
votes
3
answers
477
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 ...