Tag Info

Hot answers tagged

8

Man pages are written in the troff/nroff markup language. Troff, which is meant for preparing output to a phototypesetter (or to files in formats such as PostScript or PDF), will automatically change the ` and ' characters in the input into curved quotation marks, ‘ and ’. Nroff, which is what the man command runs when the output is to a terminal, will pass ...


5

Perhaps the closest thing to what you are looking for is MacPorts (or some other package management system like Homebrew). It can be used to install software(including many Unix software) easily.


5

According to this article, the main difference between this and the normal duplicate (⌘D) function is that file ownership is retained. The normal duplicate function preserves file permissions but not ownership. The best equivalent to this behavior on OSX is the ditto command. You can simply use sudo ditto src dst and it will preserve everything by default. ...


5

You can use tr: LC_ALL=C tr -d '[:blank:]\n' < file_in > file_out Since when you have to work with 10k files, a better solution would be: find . -type f -exec perl -i.bak -pe 's/ |\t|\n//g' {} +


5

A read-only file system can only be read (therefore it is named read-only). To delete files on this file-system you have to remount it read-write.


5

These quotation marks are often used because they look nice, similar to the quotation marks in printed books (which are different at the beginning and end of the quoted passage). These quotation marks may also have been added by your local troff configuration (or, could be removed by it!). The actual file may not contain these characters literally. You ...


4

Probably a limit of the terminal device line discipline internal line editor buffer. You should be able to enter long lines by pressing Ctrl+D in the middle of it (so the currently entered part be sent to cat and the line editor flushed), or by disabling that line editor altogether. For instance, if using zsh: STTY=-icanon cat > file Note that then ...


3

webster is not a common command among Unix systems. It is not a part of Debian's apt repository and it is also not part of the two major packaging tools Homebrew and MacPorts. Probably it is only available on Stanford computers. However additional commands can be installed with ease using one of the two. I would suggest using Homebrew since many packages ...


3

Rather than using Match, if you wish to allow logging in from a single host, the following works for me (in sshd_config): AllowUsers *@192.168.0.4 It only allows users logging in from 192.168.0.4, using any login on the target. You can replace * with a specific login if you wish, and specify multiple patterns separated by spaces; so for example: ...


2

The reason for this is that one of the login scripts on the target server is using stty... to set up terminal characteristics. The command fails when it doesn't have a tty, ie when you connect with scp. The solution is to protect the stty so that it runs only when an interactive session is present. There are a number of ways to do this; here are some ...


2

You've got a bit of [spy|mal]ware running. Check the following locations: ~/Library/LaunchAgents/ ~/Library/LaunchDaemons/ /Library/LaunchAgents/ /Library/LaunchDaemons/ /System/Library/LaunchAgents/ /System/Library/LaunchDaemons/ Look for things that are out of the ordinary. Google anything you don't recognize. When you find something you don't trust, ...


2

You could use GNU sed: $ shopt -s dotglob # includes "hidden" files beginning with . $ sed -i.bak ':a;N;$!ba;s/[\n \t]//g' * That will process all files in the folder. It stores a backup of the original file with extension .bak. Just use -i without .bak, if you don't want backups. To do that recusively use that: sed -i.bak ':a;N;$!ba;s/[\n \t]//g' ...


2

sed -i 's/\r/\n/g' thefile.txt "classic" macos used \r as the end-of-line character. *nix uses \n


2

Terminal resize generates a SIGWINCH signal that is sent to the foreground applications. Said applications are supposed to catch that signal (provided they care about terminal size to begin with), and adjust accordingly. What seems to be going on when you resize the terminal while nano is running from ipython is that ipython receives the SIGWINCH, but ...


1

Your use case is not very convincing. Most people include the current directory as part of their prompt; zsh has extremely rich prompt configuration possibilities (including multiline prompts, left and right prompts, etc.). With completion (which again in zsh is very configurable), you can show lists of files in the contexts where you need them. That being ...


1

If Alpine indeed works with step files, then, according to man open, you could try: open -W -n -e The -W option ensures open waits until the app is closed to return. The -n option is used to run a new instance of your app, even if it’s already running (this way, if you’re already running TextEdit, you don’t have to close the currently running instance). ...


1

There is probably a index.lock file in the .git folder that is causing this error message. The error is shown whenever a change is made by one user and the lock is owned by another user. This will protect the local git tree from commits by different users interfering with eachother. You may wonder why the lock is not owned by your user on the remote system, ...



Only top voted, non community-wiki answers of a minimum length are eligible