In the last post, I talked about command line tools that I use very often for search files. In this post, I will talk about command line tools for manipulating files or text content. Don’t forget to use man command to find detailed usage of a command. The following are commands that I use often to manipulate the content of a file or text input: echodisplay a line of text catconcatenate files and print on the standard output sedstream editor for filtering and transforming text sortsort lines...| Tech Notes from Steven
The command line utilities that I use most for searching/finding files in Linux operating systems are: findsearch for files in a directory grepprint lines matching a pattern locatefind files by name find The basic format of a find command is: find [location] [criteria] [actions] Some common examples are listed below: Find files by some name pattern: find /etc -name"*.conf" Find files by size find /var/log -size +1M There are other really useful filter options like: -empty, -newer, -perm, -typ...| Tech Notes from Steven
When you need to know a bit more about how the system identifies a given user.| v5.chriskrycho.com
Like ls, but it’s about open files instead of files in a directory. Neat!| v5.chriskrycho.com
Two of my favorite command line tools: copy and paste to the macOS clipboard. (Actually to one of… several clipboards?)| v5.chriskrycho.com
It tells you how long your computer has been running. Handy, occasionally!| v5.chriskrycho.com
Another old Unix standby… without too many extra flags.| v5.chriskrycho.com
Disk utility. Not that Mac app you might be thinking of, the older one.| v5.chriskrycho.com
One of the few Unix tools that actually follows the Unix philosophy! Mostly, anyway.| v5.chriskrycho.com
When was the *last* time a user logged in, or the computer got shut down or restarted? `last` is one way to find out!| v5.chriskrycho.com
Digging into just a few of the neat things `less` can do (I learned a bunch today).| v5.chriskrycho.com
open files and directories on macOS!| v5.chriskrycho.com