How to make `adb logcat` not show past output without using `--clear`?
Aug 31, 1:27am

To make adb logcat not show past output (i.e., only display new logs as they arrive) without using --clear, you can use the -c flag once to clear the buffer, then run adb logcat normally in a new command.

However, if you want to avoid using -c or --clear entirely, here are two alternative approaches:


1. Use adb logcat -d to Dump and Exit

Run:

bash
adb logcat -d > /dev/null

This dumps the current log buffer to /dev/null (discarding it), then exits. After this, running adb logcat will only show new logs as they arrive.


2. Use adb logcat with a Filter for Future Logs

If you want to skip past logs and only see new ones, you can use a time-based filter to only show logs from the current moment onward. For example:

bash
adb logcat --since "now"

This will only display logs generated after the command is executed.


Aug 31, 1:27am

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.

Vibe can make mistakes. Check answers. Learn more