terminal

PHP built-in server error log location

与世无争的帅哥 提交于 2019-12-09 02:20:04
问题 I don't know if there's any? but is php built in web server also save its error logs in a file? for tailing purposes, like when creating virtual host in apache. UPDATE: i'm using mac osx 回答1: The built-in webserver doesn't log anywhere by default, so you need to provide a php.ini for it to customise this. For example, if you created a file called php.ini with this content: error_log = /Users/me/test.log log_errors = on date.timezone = UTC Then you can start PHP's built-in webserver like this:

unknown error after kill did not terminate sucessfully: signaling init process caused “permission denied”\n: unknown'

怎甘沉沦 提交于 2019-12-09 01:52:57
问题 I am trying to startup or some docker containers or at least busy with the docker containers. After first installation every thing whas working perfect. and dint do any thing different than just docker-compose up down stop restart and also making some wordpress containers and PHPmyadmin and MariaDB. But now when i try to shutdown the docker container it gives me permissions denied. I have search every thing so far on the web like adding www-data to the groups or try with sudo to kill it.

Getting the amount of available lines in a terminal

六眼飞鱼酱① 提交于 2019-12-08 19:28:29
问题 How can the amount of available lines in a terminal be found? Preferably in a cross-platform manner but any suggestions (even OS-specific) are welcome. The height and length of a terminal can be found using the os module however this does not take into account the amount of lines that may already have been used. To clarify things here is an example: In this example the height of the terminal here is 33 however since 3 lines have been used, only 30 lines are available. 回答1: Determining by that

How to use vi to edit a command in terminal on Linux?

对着背影说爱祢 提交于 2019-12-08 19:26:59
问题 When typing a very long command, I'd like to first edit the command in a text editor(e.g. vi) then execute in case of typos. Is there a way to edit the command directly in a terminal and run instead of invoke vi by typing vi then type the command? 回答1: If you're using bash, try the edit-and-execute-command command. By default, this is assigned to Ctrl-x Ctrl-e (type ctrl-x, then ctrl-e). This should open whatever editor is specified in your environment. Whatever is in the buffer when you exit

Make MIMETYPE file the first file in an EPUB ZIP file?

て烟熏妆下的殇ゞ 提交于 2019-12-08 18:39:30
My goal is to create an EPUB file via an AppleScript, and I'm starting with semi-manually generating an EPUB file. My issue is that the IDPF EPUB validator reports that my MIMETYPE file isn't isn't the first file in my EPUB package or that my MIMETYPE doesn't exist. My AppleScript is creating the EPUB folder structure and a MIMETYPE file: set EPUBMIMETYPEfilepath to ((EPUBfolderPath & ":MIMETYPE") as string) set referenceToEPUBMIMETYPEfile to a reference to file EPUBMIMETYPEfilepath open for access referenceToEPUBMIMETYPEfile with write permission write "application/epub+zip" to

When I try to run vim in command line I get Python errors

旧街凉风 提交于 2019-12-08 16:24:02
问题 When I try running vim in the Terminal (so as to follow @romainl's suggestion in my other question) I get lots of Python errors, which all boil down to: IOError: invalid Python installation: unable to open /usr/include/python2.7/pyconfig.h (No such file or directory) Why is this? I can use Python or Sublime Text even, without any problems. The full list of errors is the following: Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7

awk to output table-like or excel-like columns in linux terminal?

萝らか妹 提交于 2019-12-08 16:23:10
问题 I do a long pipe, that ends with ...| awk '{print $5"\t\t" $3"\t"$4}' in the Linux terminal. The columns are padded with tabs. The first column entries have different number of characters, so the second column results are not perfectly vertical. How to make the table look perfect? 回答1: try to pipe the result to column -t: ...| awk '{print $5"\t\t" $3"\t"$4}'|column -t hope it helps 回答2: if your fields are tab separated the following one line script could print a table with cell borders sed -e

Running `pip` gives 'command not found' after successful Python homebrew install

微笑、不失礼 提交于 2019-12-08 15:46:48
问题 To preface, I am very bad with the terminal, please be patient with me. when I run pip I get: zsh: command not found: pip I have installed Python 2.7.11 with brew, which should allow pip to work When I run echo $PATH I get /usr/local/sbin /Users/Nicolas/.composer/vendor/bin /Library/Frameworks/Python.framework/Versions/3.4/bin /usr/local/bin /usr/bin /bin /usr/sbin /sbin I notice that /usr/local/bin/ is in there, which I understand is where brew executables are linked to when I run which -a

Could not find conda environment

喜夏-厌秋 提交于 2019-12-08 15:31:33
I am trying to re-enter my conda environment but I am having trouble doing so as when I type conda activate (evironment name) or source activate (environment name) both return the error 'Could not find conda environment.' This is very strange as when I type conda info --envs , I get this: # conda environments: # base * /Users/(my name)/anaconda3 /anaconda3/envs/(environment name) Names and Prefixes For a Conda env to have a name it must be installed in one of the envs_dirs directories (see conda config --show envs_dirs ). Creating an env outside of one of those forfeits its "name-ability".

How do I insert a tab character in Iterm?

若如初见. 提交于 2019-12-08 14:52:30
问题 Simply put, I know you can do ctrl + v + tab to insert a physically real tab character in a bash statement. But how do I do the same for iTerm? 回答1: The answer was to hit control+v, then tab afterwards, not all together! Hope this helps someone. 回答2: It's not iTerm, but your shell that affects how you''re able to insert a tab. First, make sure you're in BASH shell: Type the following command: $ echo $RANDOM $BASH_VERSINFO 23714 3 The first is a random number, and the second should be the BASH