- May 04, 2019.
- See full list on tails.boum.org.
- $ tail -40 -f /var/log/system.log. Extract lines 40-50 from a file, first using head to get the first 50 lines then tail to get the last 10: $ head -50 file.txt tail -10 'Money will buy a pretty good dog, but it won't buy the wag of his tail' Henry Wheeler Shaw. Related macOS commands: cat - Concatenate and print (display) the content of files.
May 01, 2017.
Jul 06, 2017. . New command line /finv to invert filter and /ontop to put mTail on top + you can now tail from 0%, 25%, 50%, 75% or from end of the file. This is very useful to see, for example, the header of a big file: Put 0% to see the header, go back to 100% to tail. To set this position, right-click on the status pane displaying the 'lines read'. For more info on the tail command, why not broaden you LINUX command-line skills be typing in the using a command like the following: man tail.The man command is short for manual, and it can be used to find out more about any command. Remember, the tail command reads the last 10 lines of any text files and writes the results to standard output (the monitor screen).
On Unix-like operating systems, the tail command reads a file, and outputs the last part of it (the 'tail').
The tail command can also monitor data streams and open files, displaying new information as it is written. For example, it's a useful way to monitor the newest events in a system log in real time.
This document covers the GNU/Linux version of tail.
Description
By default, tail prints the last 10 lines of each file to standard output. If you specify more than one file, each set of output is prefixed with a header showing the file name.
If no file is specified, or if file is a dash ('-'), tail reads from standard input.
Syntax
Options
Option | Description |
---|---|
-c [+]num, --bytes=[+]num | Output the last numbytes of each file. You can also use a plus sign before num to output everything starting at byte num. For instance, -c +1 will print everything. A multiplier suffix can be used after num to specify units: b (512), kB (1000), K (1024), MB (1000*1000), M (1024*1024), GB (1000*1000*1000), G (1024*1024*1024), and so on for T (terabyte), P (petabyte), E (exabyte), Z (zettabyte), Y (yottabyte). |
-f, --follow[={name|descriptor}] | This option will cause tail will loop forever, checking for new data at the end of the file(s). When new data appears, it will be printed. If you follow more than one file, a header will be printed to indicate which file's data is being printed. If the file shrinks instead of grows, tail will let you know with a message. If you specify name, the file with that name is followed, regardless of its file descriptor. If you specify descriptor, the same file is followed, even if it is renamed. This is the default behavior. |
-F | 'Follow and retry'. Same as using --follow=name --retry. |
-nnum, --lines=num | Output the last num lines, instead of the default (10). If you put a plus sign before num, tail will output all lines beginning with that line. For example, -n +1 will print every line. |
--max-unchanged-stats=num | If you are following a file with -f or --follow=name, tail continuously checks the file to see if its size has changed. If the size has changed, it reopens the file and looks for new data to print. The --max-unchanged-stats option reopens a file, even if its size has not changed, after every num checks. This option is useful if the file might be spontaneously unlinked or renamed, such as when log files are automatically rotated. |
--pid=pid | When following with -f or --follow, terminate operation after process IDpid dies. |
-q, --quiet, --silent | Never output headers. |
--retry | Keep trying to open a file even if it is temporarily inaccessible; useful with the --follow=name option. |
-snum, --sleep-interval=num | When following with -f or --follow, sleep for approximately num seconds between file checks. With --pid=pid, check process pid at least once every num seconds. |
-v, --verbose | Always print headers. |
--help | Display a help message, and exit. |
--version | Display version information, and exit. |
Examples
Outputs the last 10 lines of the file myfile.txt.
Outputs the last 100 lines of the file myfile.txt.
Outputs the last 10 lines of myfile.txt, and monitors myfile.txt for updates; tail then continues to output any new lines that are added to myfile.txt.
Tip: tail will follow the file forever. To stop it, press CTRL + C.
This is a useful example of using tail and grep to selectively monitor a log file in real time.
In this command, tail monitors the file access.log. It pipesaccess.log's final ten lines, and any new lines added, to the greputility. grep reads the output from tail, and outputs only those lines which contain the IP address24.10.160.10.
Related commands
cat — Output the contents of a file.
head — Display the first lines of a file.
more — Display text one screen at a time.
pg — Browse page by page through text files.
Docker Desktop for Mac is the Community version of Docker for Mac.You can download Docker Desktop for Mac from Docker Hub.
By downloading Docker Desktop, you agree to the terms of the Docker Software End User License Agreement and the Docker Data Processing Agreement.
What to know before you install
README FIRST for Docker Toolbox and Docker Machine users
If you are already running Docker on your machine, first readDocker Desktop for Mac vs. Docker Toolbox to understand theimpact of this installation on your existing setup, how to set your environmentfor Docker Desktop on Mac, and how the two products can coexist.
Relationship to Docker Machine: Installing Docker Desktop on Mac does not affect machines you created with Docker Machine. You have the option to copy containers and images from your local default
machine (if one exists) to the Docker Desktop HyperKit VM. Whenyou are running Docker Desktop, you do not need Docker Machine nodes running locally (or anywhere else). With Docker Desktop, you have a new, nativevirtualization system running (HyperKit) which takes the place of theVirtualBox system. To learn more, see Docker Desktop for Mac vs. Docker Toolbox.
Tail For Windows (Command Line Utility) Download ...
System requirements
See Full List On Tails.boum.org
Your Mac must meet the following requirements to successfully install Docker Desktop:
Mac hardware must be a 2010 or a newer model, with Intel’s hardware support for memory management unit (MMU) virtualization, including Extended Page Tables (EPT) and Unrestricted Mode. You can check to see if your machine has this support by running the following command in a terminal:
sysctl kern.hv_support
If your Mac supports the Hypervisor framework, the command prints
kern.hv_support: 1
.macOS must be version 10.13 or newer. That is, Catalina, Mojave, or High Sierra. We recommend upgrading to the latest version of macOS.
If you experience any issues after upgrading your macOS to version 10.15, you must install the latest version of Docker Desktop to be compatible with this version of macOS.
Note: Docker supports Docker Desktop on the most recent versions of macOS. That is, the current release of macOS and the previous two releases. Docker Desktop currently supports macOS Catalina, macOS Mojave, and macOS High Sierra.
As new major versions of macOS are made generally available, Docker stops supporting the oldest version and support the newest version of macOS (in addition to the previous two releases).
At least 4 GB of RAM.
VirtualBox prior to version 4.3.30 must not be installed as it is not compatible with Docker Desktop.
What’s included in the installer
The Docker Desktop installation includes Docker Engine, Docker CLI client, Docker Compose, Notary, Kubernetes, and Credential Helper.
Install and run Docker Desktop on Mac
Double-click
Docker.dmg
to open the installer, then drag the Docker icon to the Applications folder.Double-click
Docker.app
in the Applications folder to start Docker. (In the example below, the Applications folder is in “grid” view mode.)The Docker menu in the top status bar indicates that Docker Desktop is running, and accessible from a terminal.
If you’ve just installed the app, Docker Desktop launches the onboarding tutorial. The tutorial includes a simple exercise to build an example Docker image, run it as a container, push and save the image to Docker Hub.
Click the Docker menu () to seePreferences and other options.
Select About Docker to verify that you have the latest version.
Congratulations! You are now successfully running Docker Desktop.
If you would like to rerun the tutorial, go to the Docker Desktop menu and select Learn.
Uninstall Docker Desktop
To unistall Docker Desktop from your Mac:
- From the Docker menu, select Troubleshoot and then select Uninstall.
- Click Uninstall to confirm your selection.
Note: Uninstalling Docker Desktop will destroy Docker containers and images local to the machine and remove the files generated by the application.
Switch between Stable and Edge versions
Docker Desktop allows you to switch between Stable and Edge releases. However, you can only have one version of Docker Desktop installed at a time. Switching between Stable and Edge versions can destabilize your development environment, particularly in cases where you switch from a newer (Edge) channel to an older (Stable) channel.
For example, containers created with a newer Edge version of Docker Desktop maynot work after you switch back to Stable because they may have been createdusing Edge features that aren’t in Stable yet. Keep this in mind asyou create and work with Edge containers, perhaps in the spirit of a playgroundspace where you are prepared to troubleshoot or start over.
Experimental features are turned on by default on Edge releases. However, when you switch from a Stable to an Edge release, you must turn on the experimental features flag to access experimental features. From the Docker Desktop menu, click Preferences > Command Line and then turn on the Enable experimental features toggle. Click Apply & Restart for the changes to take effect.
To safely switch between Edge and Stable versions, ensure you save images and export the containers you need, then uninstall the current version before installing another. For more information, see the section Save and Restore data below.
Save and restore data
You can use the following procedure to save and restore images and container data. For example, if you want to switch between Edge and Stable, or to reset your VM disk:
Use
docker save -o images.tar image1 [image2 ...]
to save any images you want to keep. See save in the Docker Engine command line reference.Use
docker export -o myContainner1.tar container1
to export containers you want to keep. See export in the Docker Engine command line reference.Uninstall the current version of Docker Desktop and install a different version (Stable or Edge), or reset your VM disk.
Use
docker load -i images.tar
to reload previously saved images. See load in the Docker Engine.Use
docker import -i myContainer1.tar
to create a filesystem image corresponding to the previously exported containers. See import in the Docker Engine.
For information on how to back up and restore data volumes, see Backup, restore, or migrate data volumes.
Where to go next
- Getting started provides an overview of Docker Desktop on Mac, basic Docker command examples, how to get help or give feedback, and links to other topics about Docker Desktop on Mac.
- Troubleshooting describes common problems, workarounds, howto run and submit diagnostics, and submit issues.
- FAQs provide answers to frequently asked questions.
- Release notes lists component updates, new features, andimprovements associated with Stable releases. For information about Edge releases, seeEdge release notes.
- Get started with Docker provides a general Docker tutorial.