terminal

mac os x terminal problem faced

冷暖自知 提交于 2020-01-05 08:52:04
问题 oh my god...i faced a big problem...i was created a .bash_profile in ~ folder and then set paths there...bust the big problem is after restarting my bash i see that none of my commands work like LS and RM and etc... now i dont know how to fix it...some one help me...i need my terminal as soon as possible... 回答1: Make sure you are appending to the existing $PATH. PATH=$PATH:/Users/mthalman/bin 回答2: To prevent this happening in the future: When I edit my environment files (including bashrc,

How to modify file permissions

断了今生、忘了曾经 提交于 2020-01-05 07:22:10
问题 I made script (steamBlob.command), which deletes the file /Users/myuser/Library/Application\ Support/Steam/ClientRegistry.blob ... and another one. The code is chmod +x steamBlob.command rm -Rf /Users/pipsqueaker/Library/Application\ Support/Steam/ClientRegistry.blob rm -Rf /Users/pipsqueaker/Library/Application\ Support/Steam/AppUpdateStats.blob rm -Rf Users/pipsqueaker/Desktop/theRace.odt However, when I double click this to run it a windows pops up showing the message The file “steamBlob

Change terminal window background color and text

邮差的信 提交于 2020-01-05 07:14:23
问题 I'm very new to development and I apologise if this is nooby or even not possible. There are similar questions to this but they all seem to be with other applications or plugins. Also because im new to this I do not know the correct terminology so forgive me there again. At the moment I have this in a file called show_error_logs.sh osascript <<END tell application "Terminal" do script "cd /vagrant" in window 1 do script "vagrant ssh" in window 1 do script "sudo su" in window 1 do script "cd

Run emacs as separate process from terminal

蓝咒 提交于 2020-01-05 05:47:18
问题 When I run the emacs text editor the process does not return so I cannot use the terminal which is obviously the default behavior. I cannot find the switch or command in the man but I know it is something very simple. How can I run emacs as a separate process so I can continue to use the terminal without opening a second one? 回答1: You can start any program in the background by appending an ampersand to the command, emacs & . There's a whole framework for working with backgrounded processes,

How do I turn OFF colors for ls output in Terminal on OSX

回眸只為那壹抹淺笑 提交于 2020-01-05 03:57:11
问题 my ls output colors all directories differently from files, regardless whether I type ls or /bin/ls . I don't have any LS_COLOR stuff set in .bashrc or related files that I can find. How do I turn off these colors? (I am quite happy with just ls -F ) Thanks! 回答1: As noted in comment, OSX ls pays attention to CLICOLOR . The ls manual page is the place to look. It appears to be the same program as in FreeBSD, which uses the terminal database (in contrast to GNU ls). Likewise, note that the

How can i format the output of stat expression in Linux Gnome Terminal?

不羁的心 提交于 2020-01-04 17:29:07
问题 I am really newbie in Linux(Fedora-20) and I am trying to learn basics I have the following command echo "`stat -c "The file "%n" was modified on ""%y" *Des*`" This command returns me this output The file Desktop was modified on 2014-11-01 18:23:29.410148517 +0000 I want to format it as this: The file Desktop was modified on 2014-11-01 at 18:23 How can I do this? 回答1: You can't really do that with stat (unless you have a smart version of stat I'm not aware of). With date Very likely, your

Run an R-script from command line and store results in subdirectory

江枫思渺然 提交于 2020-01-04 13:58:05
问题 I want to run an R-script from the command line (on a Linux machine) and store the results in a subdirectory of the working directory. It looks like that: ./myscript.r [param 1] [param 2] [param 3] Given 3 binomial parameters there are 4 conditions in total. I want to store the results of each condition in a subdirectory of the working directory. Is there an elegant way to do that or do I really need to copy my R-script to every subdirectory? 回答1: Purcell,try saving and running this script on

Special Characters in Google Calculator

你离开我真会死。 提交于 2020-01-04 12:14:53
问题 In a previous question I was told that Google passes UTF-8 encoded responses to queries. This solved a problem with non-breaking spaces (A0) being muddled after being passed by curl to my terminal. This was solved by piping the curl output to inconv and converting to UTF-8. However, even with this solution in place, I am still getting some strange output. Consider the following conversion of 2 m to feet: http://www.google.com/ig/calculator?hl=en&q=2%20m%20in%20feet This is the output I'm

Run multiple .sh scripts from one .sh script? CentOS

。_饼干妹妹 提交于 2020-01-04 09:19:55
问题 How can I run multiple .sh scripts from one .sh script and run them all in separate terminals? I already have /root/A.sh & /root/B.sh & /root/C.sh The issue is it runs all of these in the same terminal at the same time, and without the &'s , it runs them when the previous one is finished running, how can I make them all startup at the same time in separate terminals? 回答1: Here is one way leveraging gnome terminal tabbing capability : gnome-terminal \ --tab-with-profile=Default --title=A.sh -

Apachectl “service already loaded” when it's not

蓝咒 提交于 2020-01-04 05:32:09
问题 I am trying to learn a bit about the terminal and servers. I am following a course and in this course it states that you can start and stop the server apache (on mac) by using the command: sudo apachectl start But, when I do this, it comes back with a message saying that apache is already functioning. The full message: /System/Library/LaunchDaemons/org.apache.httpd.plist: service already loaded Apache is clearly not running though: ps aux | grep httpd doesn't return any activity. I expect