Tag Info

New answers tagged

0

You could change the ownership of the folder by: sudo chown -R username:groupname /mount/mac/Desktop Replace username with your user-name.


0

My answer is inline with others, but I can't comment yet so I get to start new: Most files in /Applications are compressed and when you copy it that is lost. When compression is used in HFS+ the files data is stored in the Resource Fork OR an extended attribute if it's small enough ( less than 4k). If it's in a resource fork du (at least on Yosemite) will ...


0

TEMP="$(mktemp -q -d -t "$(basename "$0").XXXXXX")" mktemp for BSD (including OSX) requires a template, but it allows any number of Xs in the template. (GNU) mktemp for Linux does not require a template, however, if a template is specified, then the number of Xs must be 6. Note that -t is deprecated for GNU mktemp, so a more future-proof code would be ...


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

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


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


0

The option -i in sed isn't quite compatible between Linux and Unix and it may not be available on other operating systems. Secondly you can't use -i and IO-redirection (>) together, because it's excludes it-self. Using in-place editing already modifying the file. So if you'd like to edit file in-place (into the same file), it's better to use ex: ex ...


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


0

I don't know abouut showins ls output, but zsh has a nifty feature RPROMPT. Put this in .zshrc and see if it meets your needs: PROMPT=$'%n@%m\n%! %% ' RPROMPT='# %d' That puts current working directory on the right-hand-side of the prompt for me. I include an example of PROMPT with a newline in it, so that if RPROMPT doesn't work as you'd like, you can ...


0

since i'm not an apple-user (maybe the guys at https://apple.stackexchange.com/ know it better) i'm not sure about the OS X boot manager, but some time ago i read it's not a real boot manager because it's really stripped down... thats why rEFIt and it's successor rEFInd was created! to make it really easy: i would recommend to follow "your" tutorial (it's ...


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

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


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.


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


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


0

fuser /dev/audio (or whatever devices and paths there are to your OS's sound device(s))


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


0

Rsync doesn't keep any memory from one run to the next. If you move a file to a different computer, rsync doesn't care. If you interrupt rsync in the middle of transferring a large file (it isn't clear from your question whether you intended to do that), that file is lost. To keep partial transfers, pass the --partial option.


0

You'll need to repair your OS X installation. You can do this without destroying data on your Mac. This post from Apple Discussions explains it well: Do the following: Repair the Hard Drive and Permissions Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the ...


0

The guest did have 4 Cores selected from 4 marked as green with 90% processing power on a dual core chip. Changed it to 2 cores and now it works. Thank you Marc for your hint with the RAM.


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


0

Fromthe point of speed of handling the file contents, I would assume that tr is faster than a regexp solution in perl, sed or similar. As for looping over ten thousand files, there's not much you can do, since tr will process stdin to stdout, so you're spawning tr 10k times any way you do it. For that, find . -maxdepth -exec is as good a way to go as any.


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.


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


0

Since posting I've continued digging and found several resources surrounding the issue and though I'd note them here. on OSX if you have Xcode installed there are utilities that are useful in the /Dev*/App*/Util*/ directory... specifically USBProber.app and IORegistryExplorer.app in USBProper there is a check box for "Probe suspended devices". once checked ...


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



Top 50 recent answers are included