Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Head and Tail commands #1407

Merged
merged 7 commits into from
Oct 31, 2023
Merged

Head and Tail commands #1407

merged 7 commits into from
Oct 31, 2023

Conversation

RafBishopFox
Copy link
Collaborator

This PR primarily adds the head and tail commands. The commands allow the operator to grab the first or last n lines or bytes from a specified file. head and tail try their best with binary files. These commands are useful if you want to preview a file before downloading it.

This PR also fixes two small bugs:

  • For the download command, if the local path is not specified, the current path is assumed. Previously, not specifying a local path caused a panic.
  • Return an error when trying to cat a directory. Previously, cating a directory output the contents of the gzipped directory to stdout. cating a directory does not make sense, so it is better to return an error.

@RafBishopFox RafBishopFox requested a review from a team as a code owner September 14, 2023 16:53
rkervella
rkervella previously approved these changes Oct 19, 2023
@rkervella
Copy link
Member

@RafBishopFox there are some conflicts with the recently merged grep command.

@moloch-- moloch-- merged commit 13fb854 into master Oct 31, 2023
5 checks passed
@RafBishopFox RafBishopFox deleted the heads-and-tails branch November 1, 2023 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants