terminal

SSH asking every single time for passphrase

*爱你&永不变心* 提交于 2019-12-09 14:00:36
问题 I have an annoying problem with my private key. Every time I want to clone or push via ssh in terminal or Tower app, I have to type my passphrase. I even removed and recreated the ssh key and set the key on Github several times, but it looks like it has a short lifetime and after a couple of minutes, is expired! I followed generate a new SSH key to create the key. At the end I ran ssh-add ~/.ssh/id_rsa and it printed out: Identity added: /Users/sajad/.ssh/id_rsa (/Users/sajad/.ssh/id_rsa)

cp: missing destination file operand after

家住魔仙堡 提交于 2019-12-09 13:13:21
问题 Im trying to do a full back up and copy over all files from one directory into another directory #!/bin/bash #getting files from this directory PROJECTDIRECTORY=/../../Project3 #Copied to this directory FILEBACKUPLOCATION= /../.../FMonday for FILENAME in $PROJECTDIRECTORY/* do cp $FILENAME $FILEBACKUPLOCATION done But I keep getting this error ./fullbackup: line 6: /../../FMonday: Is a directory cp: missing destination file operand after 回答1: Variable assignments in bash scripts require no

How to compile java project with external jar file in Linux terminal

妖精的绣舞 提交于 2019-12-09 12:33:35
问题 I have project which includes external jar file in it, I followed this link http://www.wikihow.com/Add-JARs-to-Project-Build-Paths-in-Eclipse-%28Java%29 to add external java path. Then I tried to compile my code in terminal, however I am still get an error about jar file does not exist. I wrote the following commands: (Currently I am in the project directory and there are three folders called bin src and lib in there) bash-3.2$ ls bin lib README.txt src bash-3.2$ javac -cp lib/jsoup-1.6.1.jar

erasing terminal output on linux

孤街醉人 提交于 2019-12-09 10:55:25
问题 I was writing a command line program which will have a status bar, much like wget. The main problem I'm facing is: how do I delete what I've already sent into stdout/stderr? I had on idea: use the backspace char '\b' and erase the output I've sent. Is that the best way? Is it the only way? Is there a better way? PS: I don't want to use anything like ncurses. Plain old C please. Thanks EDIT: Can I also go up and/or down? Example: I have 10 lines of output, I want to change the 3rd line from

Scapy installation fails due to invalid token

北城余情 提交于 2019-12-09 07:30:28
问题 I have recently taken up learning networks, and I want to install scapy. I have downloaded the latest version (2.2.0), and have two versions of python on my computer- 2.6.1 and 3.3.2. My OS is windows 7 64 bit. After extracting scapy and navigating to the correct folder in the terminal, I was instructed to run "python setup.py install". I get the following error- File "setup.py", line 35 os.chmod(fname,0755) ................................^ ......................invalid token (dots for

OS X Mavericks install rvm WARNING

喜夏-厌秋 提交于 2019-12-09 07:18:00
问题 When running this in terminal: $ curl -L https://get.rvm.io | bash -s It seems to work fine, but in the Upgrade Notes at the end it says * WARNING: You have '~/.profile' file, you might want to load it, to do that add the following line to '/Users/steven/.bash_profile': source ~/.profile And I can't use RVM, getting the error -bash: rvm: command not found' I am pretty new to terminal and Ruby, so any help would be greatly appreciated. 回答1: When you install rvm its paths get added to ~/.bash

Specify CLI path for mTurk for Mac

放肆的年华 提交于 2019-12-09 04:36:33
I am setting up the CLI on a MAC (iOS 10.9) and I believe I've set up the MTURK_CMD_HOME and JAVA_CMD_HOME paths correctly. But, I'm still getting an error that the file can't be found when I run getBalance.sh . My code is as follows: /users/USER/Desktop/aws-mturk-clt-1.3.1/ -bash: /users/USER/Desktop/aws-mturk-clt-1.3.1/: is a directory /System/Library/Frameworks/JavaVM.framework/Home -bash: /System/Library/Frameworks/JavaVM.framework/Home: is a directory export MTURK_CMD_HOME=/users/USER/Desktop/aws-mturk-clt-1.3.1/ export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home export

Version control Word .docx files with docx2txt with Git on Mac OS X

一曲冷凌霜 提交于 2019-12-09 04:18:41
问题 On Git web site there is a detailed instruction for version controling Microsoft Word .doc files with catdoc . http://git-scm.com/book/en/Customizing-Git-Git-Attributes However, I realized that this doesn't work for .docx files. It seems that you need either docx2txt or unoconv instead of catdoc (found here). I decided to go with docx2txt for no reason, but I was stuck at the installation of docx2txt into Mac OS X. This sort of illustrates the steps. In my understanding, all you need is

How do I kill this tomcat process in Terminal?

∥☆過路亽.° 提交于 2019-12-09 04:07:10
问题 Using ps -ef | grep tomcat I found a tomcat server that is running. I tried kill -9 {id} but it returns "No such process." What am I doing wrong? Here's an example: Admins-MacBook-Pro:test-parent tom.maxwell$ ps -ef | grep tomcat 2043706342 39707 39695 0 3:40PM ttys000 0:00.00 grep tomcat Admins-MacBook-Pro:test-parent tom.maxwell$ kill -9 39707 -bash: kill: (39707) - No such process 回答1: There is no need to know Tomcat's pid (process ID) to kill it. You can use the following command to kill

Mac OS X shell utility that shows individual cpu usage in multi-core systems

﹥>﹥吖頭↗ 提交于 2019-12-09 02:39:54
问题 I've been looking for a osx utility that shows cpu usage for each cpu. For example CPU 0 - 10% CPU 1 - 2% ... I know of many ways of getting this information in other Unix-like system (/proc, mpstat, etc) but none work in osx. The most useful one for Mac is top but it only shows total cpu usage. I need the application to be run from the shell so that I can log the usage over time. I also tried cpuwalk.d but it only shows you if the application is running in one or more cores. If you take a