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 ...


7

Sure, of course, since you can develop portable software that runs on both MacOS and Linux. Be sure to test it on Linux at regular intervals to make sure you haven't unintentionally added something unportable. If you want to use Linux-specific features then you will have more of a hard time. Depending on what it is you do, the program may compile on MacOS ...


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

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

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

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: ...


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 ...


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' ...


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, ...


1

Lets add some Debugging Info, like so: $f = fopen('mmascript.m', 'w'); echo "fopen complete." fwrite($f, "#!/Applications/mma/Contents/MacOS/MathematicaScript -script\n"); echo "fwrite 1 complete." fwrite($f, 'Print[100]'); echo "fwrite 2 complete. fclose($f); echo "close complete." chmod('mmascript.m', 0777); echo "Permissions Successfully Changed." ...



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