Hot answers tagged

93

less filename From the command line, it lets you view files straightaway without loading the full file into memory.


37

I would not try to open it... I'd rather do: grep - look for some text split - chop the file into say 10Mb chunks. Something like: grep "crash" My80GbFile.txt | more If the big file is not "Line delimited" split -b 10M My80GbFile.txt But if the big file is just a load of lines, then (as was posted), split by line (100,000 per sub-file) in this case. ...


26

QLStephen is a more general solution that works for all kinds of text files.


26

In terms of your immediate needs, the best free visual editor for macOS is BBEdit (linked to the Mac App Store download) and it does so much - a true powerhouse. Once you have it, you can also pay up for the pro / automation / out of gratitude features, but it's free forever if you want and like that price. https://www.barebones.com/products/bbedit/index....


25

Text messages from your Mac are actually sent through your iPhone. On your iPhone go to the Settings app → Messages → Text Message Forwarding. You may need to re-do the setup by removing and re-adding your Mac in there.


20

You can click on the magnifying glass icon and choose Insert Pattern or press ⌃ CTRL+⌥ ALT+⌘ CMD+P Then pick Line Break


19

Open the Terminal application Type or paste defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO Press ↩︎ (Enter) Restart the computer To return it back, do the same but instead type in the terminal defaults write -g CGFontRenderingFontSmoothingDisabled -bool YES Update on 2019.10.12: the solution works in macOS 10.15 too. Update on 2019.12....


16

Yes, you certainly can! Just start typing your word and press F5 to reveal up to 20 possible words. To use your example, below is a screenshot showing how this works when I type envir and press the F5 key: You can then use the arrow keys (or mouse) to select the word you want (or just hit enter to accept the first word). And, because this only appears when ...


15

In systems up to 10.11.6 you can save the "Purchased" page as html file to disk: Quit App Store.app Open Terminal.app in /Applications/Utilities Enter defaults write com.apple.appstore ShowDebugMenu -bool true and hit the Return/⏎ key to show the debug menu in App Store.app. Open App Store.app (check that the "Debug" menu is available!) If you have some ...


12

Just don't (open it as ONE file) Is there any specific reason that you can not simply break it into about 1GB chunks with a script? Yes, searching and similar functionality will suffer but that will already be the case with a 80GB file. If you have specific break points in the script (days in the timestamp, startup / shutdown messages) you could also ...


11

Another way to convert non-ASCII characters to ASCII variants is to use iconv -t ASCII//TRANSLIT: $ echo ‘’“”–—…äé | iconv -t ASCII//TRANSLIT ''""--..."a'e ASCII//IGNORE would remove non-ASCII characters, but you can also do that with for example tr -dc '\0-\177'.


11

If you have a Touch Bar, you can enable ‘Touch Bar typing suggestions’. This shows the same 3 options you're used to on iOS on the Touch Bar as you type. This will also show emoji suggestions like iOS. Enable it from System Preferences → Keyboard → Text → Touch Bar typing suggestions.


11

Use less in a terminal window. It will show you one page at a time of the file, will only load about that much in memory, so you can navigate multi-TB files with it if you want. You probably should add the -n option to prevent less from trying to compute line numbers. So: less -n /path/to/file Remember you can type less -n (don't forget the final space) ...


10

This answer has been updated to reflect rubik's sphere's misunderstanding between what Rich Text is (what was originally asked about) and what's actually being worked with from Google Chrome, being HTML. (See comments moved to chat.) I'm leaving the original answer as is, and below this new content, as it does technically answer the original question as ...


10

You can do it in Safari, but Chrome ignores the standard Mac Toolbox, unfortunately. System Prefs > Keyboard > Shortcuts > App Shortcuts You can set key commands for All Applications, which will then work for all that have the requisite menu option. This is my own setup, which shows keys already set for Capitalise & Lower Case I use it a lot for ...


10

Both Klanomath and PeterVP provide suitable answers. If all you want is a list of the apps, I'd refer you to those. However, if you'd like other details included (such as Version etc) or you just don't like using Terminal, you can achieve what you want with these steps: Go to Apple > About This Mac Click on the System Report... button on the window that ...


10

Globbing isn't random, it's guaranteed to be alphabetical (a.k.a. lexicographic order according to your locale), which is different from numeric sorting order. You can use brace expansion for this. Replace '10' with the number of the last file. cat {1..10}.txt > merged.txt This uses bash brace expansion, which you can read about at LESS='+/Brace ...


9

You can set this up as a right click service in automator as @Matthieu Riegler suggested. Open up Automator.app and create a “Service” with this workflow. Pay close attention to the checkbox up top, “Output replaces selected test”. After the workflow is in place and saved, navigate to “System Preferences-->Keyboard.” On the left hand side select “...


9

A simple trick is to just copy the rest of a line and paste it into the "replace" field. Works with Textedit, Xcode etc.


9

With TextEdit in focus, select Format → Make Plain Text option in the Menu bar or use the keyboard shortcut Shift + Command + T to change the file encoding to plain text. This will also set the extension of unsaved file to .TXT from the default .RTF. Now, save the file normally by invoking File → Save... in the Menu bar, or using the keyboard shortcut ...


9

With disk based text editors, the file is not loaded entirely into memory - what you see on the UI is a peek into the contents the editor has loaded into memory. I have used UltraEdit successfully in the past to do large log file analysis. Its regex based search tools and location bookmarks are especially useful. It loads the file snappily, and you can do ...


8

You can use Unicode combining character U+0305 COMBINING OVERLINE. It can be found by searching in the palette from Edit → Emoji & Symbols (formerly Edit → Special Characters…), or by using a specialized keyboard layout such as the built-in Unicode Hex Input or my own custom one mostly designed for mathematics. Here's some sample text with overlines, ...


8

You can use the QLStephen plugin as mentioned but you will need to edit it as described in the project's issue tracker: https://github.com/whomwah/qlstephen/issues/23#issuecomment-21769063 Basically: Open the ~/Library/QuickLook/QLStephen.qlgenerator/Contents/Info.plist file in a text editor Add the UTI public.yaml to the key LSItemContentTypes Run qlmanage ...


8

People can develop plugins to allow Quick Look to support more file types. You can find Apple's Quick Look documentation here. Luckily though Timac (aka Alexandre Colucci) has already created one. You can find Timac's Quick Look plugin for strings files here. Just download the compiled plugin, copy it to your /Library/QuickLook folder and run the qlmanage -...


8

I use a shell script, in Terminal enter: find /Applications -path '*Contents/_MASReceipt/receipt' -maxdepth 4 -print |\sed 's#.app/Contents/_MASReceipt/receipt#.app#g; s#/Applications/##' This will list all applications you bought on the Mac App Store. If you redirect the result to a text file like so: find /Applications -path '*Contents/_MASReceipt/...


8

To select an entire line of editable text, assuming a left justified language... If the insertion point cursor is at the beginning of the line, press: Command–Shift–Right Arrow ⌘⇧➡ If the insertion point cursor is at the end of the line, press: Command–Shift–Left Arrow ⌘⇧⬅ If the insertion point cursor is at any other part of the line, press: ...


8

It's possible with CoreGraphics (CGEventPost), it's a C API (it doesn't work in a Cocoa-AppleScript), but it's possible to call an executable from an AppleScript. Here is the method to create the executable with Xcode (Version 8.3.3): You can do it yourself (you can download Xcode from the App Store), or ask a trusted person to create the executable. 1- ...


7

You can use QuicklookStephen (https://github.com/whomwah/qlstephen). Install via Brew: brew cask install qlstephen and then reset the Quicklook plugins: qlmanage -r and you should be good to go! Tested with both files without extension and files with "unknown" extension (e.g. .nfo)


7

The application needs to implement Auto Text Expansion and it hasn't been implemented in Chrome yet. You could try this Chrome plugin Auto Text Expander. You'll have to again add the text-expansions though. Mac's Text expansion should work in Safari though. If not already enabled, you can enable by typing the following in terminal. defaults write -g ...


7

One way is to create a service that runs a shell command. For this, open Automator, create a new Service, check "Output replaces selected text", then add the action "Run Shell Script". In the box where you enter the Shell script write: cat | sed 's/^/"/' | sed 's/$/"/' | sed 's/""//' This takes the text you entered as input, and adds a quotation mark at ...


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