# Tag Info

0

Never mind, I got the answer: Ctrl + C is a the standard *nix way of signaling a process to abort. It's the equivalent of CTRL + ALT + Delete in Windows.

1

This script seems to work: #!/bin/sh HOST="verizon.net" MIN_TIME=80 LOOP="TRUE" while [ $LOOP = "TRUE" ] do latency=ping -c 1$HOST | head -2 | tail -1 | sed -e 's/.*time=$$.*$$ ms/\1/' | sed -e 's/\..*//' echo "Latency: $latency" if [$latency -lt $MIN_TIME ] then echo "Target latency ($MIN_TIME) achieved!" LOOP="FALSE" fi ...

0

From what I've learned browsing StackOverflow the last few minutes, there are a few ways to try check if someone is using curl rather than a browser. Common ways include checking if the "browser" has javascript support, checking the user-agent and looking for missing request fields. I attempted to use curl to access http://yahoo.com which returned a "Will ...

0

You either need to supply the full path or the program must be in the search path. In your case you do not have your current directory (.) in the search path. Note that this is a good thing. Putting . in your search path allows unwanted things like browsing my homedir and typing 'ls'. (guess which ls will be executed. It is not /bin/ls). So, supply the ...

0

I finally put LANG = "en_US.UTF8" in my bashrc and all the user I could log in with... And in /etc/locales.conf, I chose my DM language. IMO it's not really pretty, but it works.

0

You may need to set (or change the value of) your TERM environment variable. Perhaps your Debian host doesn't recognize what you have it set to. Try changing it to xterm-256color, xterm-color, xterm, ansi, or vt100, and run /usr/bin/reset. E.g: $TERM=xterm ; export TERM$ reset You can also try going into the Mac OS Terminal.app's Preferences and ...

0

If all you care about is the major version (10.10, 10.9), you can do MAJOR_MAC_VERSION=$(sw_vers -productVersion | awk -F '.' '{print$1 "." $2}') I use this in a couple of scripts that have to do different things if run on 10.8.x, 10.9.x and now 10.10. 1 Special keys like arrows are the individual programs' responsibility on Unix-style terminals. On the Debian host you're using a shell that doesn't support arrow keys – most likely /bin/sh or something equally "minimal". Try starting bash or zsh. If one of them works, make the setting permanent using chsh. 1 It's quite hard. From my opinion for this purposes are better make own aliases for frequent commands and directories. It's simple and portable if you need it on other linux machine, because you only copy aliases from ~/.profile (on different distros it's named different) to next profile file. Or use some of alternative terminal emulators which have some ... 0 This worked for me ... ifconfig eth0 mtu 576 http://fred-web.blogspot.com.au/2012/10/ssh-hang-on-expecting.html 5 You're correct in that the iCloud Drive directory is located within Mobile Documents. From your users directory you can access iCloud Drive via terminal with: cd Library/Mobile\ Documents/com~apple~CloudDocs 0 Depends on when you need start script. repeated tasks: write script and use Cron mentioned by @ThreadedLemon (nice set of examples) on startup: write script, use chmod +x on script and use init.d (example on StackOverflow) on user logon: write script and use ~/.profile (or similar name depends on distro) (info on StackOverFlow) 2 Yet an addition to the answer above: The manual binding of shortcuts has changed in Yosemite from "Select Next Tab" & "Select Previous Tab" to "Show Next Tab" & "Show Previous Tab" 0 Those options are window options, so you need show-options -gw (or show-options -w if they have been customized for a particular window). The confusion probably comes from the fact that while set-option -g is ostensibly just for setting session options, it will also accept window option names (i.e. for convenience you can omit the -w that would otherwise ... 1 I think that I have figured it out. The bell doesn't trigger if I've already got another piece of mail open in mutt. I have to make sure I hit i before leaving the tab. 2 If you'd like to run a script periodically, save the script and run it as a cronjob. Executing a cronjob do not require a terminal to be opened. 1 Unicode is a character set. UTF are encodings. Unicode defines a set of characters with corresponding code points, ie. values that unambiguously identify characters in Unicode character set. For example according to unicode-table.com U+0041 corresponds to capital A, U+03A3 is greek capital sigma (Σ) and U+2603 is a snowman (☃). U+ numbers are ... 1 Unicode code points encoded into UTF-8 They're equivalent because of https://en.wikipedia.org/wiki/UTF-8#Description, see the algorithm for converting Unicode code points to UTF-8. It goes like this. Your code point 0x2192, is between U+0800 and U+FFFF. So we use the third row of the table. Byte 1 Byte 2 Byte 3 16 ... 0 Using the windows version of Airport Utility, you can enable the system logs. I'm sure that there is a system logging utility that creates actions when certain logs are transmitted. When the computer logs in, set an action corresponding with that system log. 1 Suggestion: In this situation I'd go with a Reverse SSH connection: Instead of your machine doing an ssh, the server machine does an ssh and through port forwarding makes sure that you can ssh back to server machine. But it's certainly not as fun as building it yourself with socat. I'd still recommend getting to the bottom of this pty issue, it's a ... 0 Create .vim folder in your home directory (if not exist) and ftplugin mkdir ~/.vim mkdir ~/.vim/ftplugin vi ~/.vim/ftplugin/c.vim now start type your commands for example : !echo 'I am c file ,, ' now save :w 1 Put your stuff in ~/.vimrc. Search for a good script for developing c, you can find good indentation and other options. 0 tmuxinator solved it: tmuxinator start [project] And it breaks through the current tmux session straight into the new one. 2 bash At the Terminal prompt, type: nano .bashrc Then look for export PS1=" " Between the quotation marks, you can change / add the following lines to customize your prompt: \d – Current date \t – Current time \h – Host name \# – Command number \u – User name \W – Current working directory (ie: Desktop/) \w – Current working directory, full path (ie: ... 0 Here's how to do it: export PS1="$\e[31;1m$ \w$ " trap 'echo -ne "\e[0m" ' DEBUG All the magic comes from Different colors for text entry and console output.

0

Do something that only admin could do and test for success or fail:- if touch c:/Users/.x ; then echo 'ok' ; fi or touch c:/Users/.x && echo ok or touch c:/Users/.x && \rm c:/Users/.x && echo ok or touch c:/Users/.x &> /dev/null && \rm c:/Users/.x && echo you are admin

0

I guess you can use a character like ▶︎ (U+25b8), but it doesn't fill the whole block with at least Menlo: If you change the prompt, surround non-printing characters with $and$: PS1='$\e[41m$\w $\e[31;44m$▶︎$\e[31m$ $\e[m$ ' \e[41m sets the background to red, \e[31;44m sets the foreground to red and the background to blue, and \e[m resets ...

1

Without -d, new-session will automatically attach to the new session (you probably do not want nested sessions*, thus the warning). What you probably want to do is create a new “detached” session and then switch the current client to that new session. I do not think new-session has an option to handle this use case, but it is fairly easy to do with a bit of ...

0

Use the execute-parameter provided by most of the linux terminal progs: Examples: xterm -e "..." see http://linux.die.net/man/1/xterm xfce-terminal -e "..." see http://man.cx/xfce4-terminal%281%29

0

Creating a command line QOTD server is trivial if you have netcat and fortune installed: # nc -lk -p 17 -e fortune Some versions of netcat may not have -e enabled, in which case use the busybox version, which does: # busybox nc -lk -p 17 -e fortune

0

This seems incorrect: 'BG_COLOUR=colour233' 'BG_COLOUR=#ffffff' I believe it should be something like: BG_COLOUR='colour233' BG_COLOUR='#ffffff' Note the single quotes only around the values and not the variable names themselves.

0

Here are a couple of simple solutions.  To simply truncate lines that are longer than 80 characters, write a script containing #!/bin/sh expand "$@" | cut -c1-80 and pipe your program into it. A slightly more sophisticated approach is #!/bin/sh expand "$@" | awk '{ if (length <= 80) print; else print substr($0,1,77) "...";}' This adds ... as a ... 0 I was able to release/renew IP using sudo ipconfig set en0 BOOTP <return> sudo ipconfig set en0 DHCP <return> but now I can't access screen sharing over ethernet using built-in VNC. I can still access it over wi-fi from my phone. 1 You could have all three showing in one terminal window (no tabs) with TMUX. A terminal multiplexer would be the easiest way to accomplish this and automate it. After installing TMUX, create file that will hold the directives (this does not need to be executable). The contents of the file can change when you become more familiar with TMUX. Example: ... 0 cd /etc/yum.repos.d/ wget http://pkgrepo.linuxtech.net/el6/release/linuxtech.repo yum list *vlc* yum -y install vlc 2 One difference is that Cmd+K clears the scrollback buffer as well as the screen. Ctrl+L only clears the screen, effectively moving what is on it "up" into the scrollback buffer. Another difference is that Ctrl+L is performed by the process running inside Terminal. For instance, bash will clear the screen and redraw the prompt, including any unfinished ... 0 There are a zillion distros that come without a window manager or desktop environment. A completely bare bones example would be Arch, like ioku said. The downside is that it is, like I said, bare bones. It doesn't have a lot of pre-installed programs that you might want, such as ssh. If you want something that is terminal based, but is more fully featured, ... 0 On the one hand, nearly any Live ISO can be made to run in console only mode, with variations on the process from distro to distro. Slackware's installation CD boots to a command line by default, as does a lot of alternate install media for other distros. On the other hand, it sounds like what you really want is a bootable USB stick with a collection of ... 0 there are so many to choose from: https://grml.org/ http://www.knopper.net/knoppix/index-en.html https://www.slax.org/ ... you can also put multiple ones onto one usb-stick via http://unetbootin.sourceforge.net/ 1 Yes. You can try Arch Linux for example. You can download it from here - archlinux.org/download/. 0 While Ubuntu if not know for being a comand line only distro, they do offer information on how to change boot defaults( like startx) you can get instructions here 0 \Administrator won't use the RD server machine as the domain. You either need to specify the server's computer name (remoteComputerName\Administrator), or use a dot (.\Administrator) to tell the remote computer that the domain for the credentials is itself. 1 Yes, either add /user/bla to your PATH variable, or make a symlink from /user/bla/ffmpeg into a directory that is already in your PATH variable, like /usr/local/bin/ This will make all executables in /user/bla available to your current account: echo 'PATH=$PATH:/user/bla' >> ~/.bash_profile This will make just ffmpeg available to all accounts: ...

0

cdto looks great and seems to be frequently maintained. They even have Mavericks and Yosemite matching icons (you have to install them manually). ShellHere has a horrible icon (and adds the cd /you/long/folder/path/here as the first command to the terminal, which is super annoying).

0

secpanel has ClusterSSH integration, maintains your remote host bookmarks and titles the terminal windows.

0

This is a very simple version which I used in bash and also works in zsh. It saves the current folder in a file, after every command (Doesn't hurt too much IMO) and opens a new terminal in the saved current folder. add the following to .zshrc # emulate bash PROMPT_COMMAND (only for zsh) precmd() { eval "\$PROMPT_COMMAND" } # open new terminal in same dir ...

1

See the Arch Wiki for configuring gpg-agent Install gnupg2 & change /usr/bin/gpg to be a symlink to /usr/bin/gpg2 (removing gnupg breaks Debian). For anyone using duply on Debian Wheezy & having problems with pinentry-curses - use duply 1.9.0 not 1.5.5 in the repos (this fixes problems signing backups with gpg). pinentry-curses now works without ...

0

Based on my experience, the answer is that you should put the following in: Shell->New Tab->Dev1

0

I guess that this is not really an answer to your question, but this is how I had it set up: A bunch of scripts which would open different "Gnome-Terminal presets". For example, in this script, I open gnome-terminal with three tabs, and call SSH with parameters in each one. #!/bin/sh PATH=/usr/bin:/bin gnome-terminal \ --tab -t CustomTabText1 -e 'sh -c ...

0

I got this error after upgrading from Lion (10.7) to Mavericks. (10.9) This fixed it: Go to Terminal > Preferences > Settings > Shell and uncheck "Run command".

Top 50 recent answers are included