Tag Info

Hot answers tagged

3

You can achieve it with dd command. Here's an example: $ hexdump StringComparison | head -1 0000000 cf fa ed fe 07 00 00 01 03 00 00 80 02 00 00 00 $ printf '\x11\x11\x11' | dd of=StringComparison bs=1 seek=4 count=3 conv=notrunc 3+0 records in 3+0 records out 3 bytes transferred in 0.000293 secs (10238 bytes/sec) $ hexdump StringComparison | head -1 ...


2

It updates the prompt to echo the Current Working Directory (CWD) and is defined in /etc/bashrc: update_terminal_cwd() { # Identify the directory using a "file:" scheme URL, # including the host name to disambiguate local vs. # remote connections. Percent-escape spaces. local SEARCH=' ' local REPLACE='%20' local ...


2

I've checked my suggestion and it worked: if you try to open a file in Finder, this file will be opened with default Application, assigned to its extension. So, if you change default App for this file, you'll get it while opening file from Terminal by click.


2

Instead of starting Emacs with open you can use emacsclient to send files to an already running Emacs. For this to work you need to start the corresponding server inside emacs by including (server-start) in your emacs init file.


1

You should also look at /etc/profile file, as it may have references to /etc/profile.d/rvm.sh. It's also worth it to read the manual for bash, as it lists all files bash will look at for configuration. This will be towards the end of the man page. To read it, in Terminal.app type man bash. Finally, you can run, again in Terminal.app, the following ...


1

Something that finally worked for me was this : Removed the rsa_id.pub file and regenerated a new one (must be in ~/.ssh/): ssh-keygen -y -f id_rsa > id_rsa.pub Ensured permissions were set to 0644 for both id_rsa and id_rsa.pub (must be in ~/.ssh/): chmod 644 id_rsa* Ran the following command: ssh-add -K After doing this, I was no longer ...


1

To keep restarting the job on succesful exit You can use launchd on OSX. For this You have to prepare *.plist file in order to "tell" launchd how to behave. To restart application on succesfull exit please look at KeepAlive -> SuccessfulExit key (more info: ...


1

Emoji are simply unicode characters that are rendered as such by the operating system. In the following screenshot, you can see that unicode is "allowed" in filenames: In fact, these are even rendered by Finder: To fix this, simply rename the file through Finder or Terminal. This happens because whatever glyph substitution algorithm that they use is ...


1

Use find: find "$arg" -iname \*.txt -o -iname \*.h -o -iname \*.py|while read f;do :;done Use IFS= read -r if the paths can end with spaces or contain backslashes. Or install bash 4: brew install bash;echo /usr/local/bin/bash|sudo tee -a /etc/shells;chsh -s /usr/local/bin/bash Then: shopt -s globstar nocaseglob;for f in "$arg"/**/*.{txt,h,py};do ...



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