hpc / hpc/mpifileutils

dfind missing error message

Open
#329 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
200
Forks
85
Avg merge
3d 21h
Merged PRs (30d)
2

Description

The following command produces a usage message, but no indication of which argument(s) I provided are/is invalid. Also, the exit status is 0.

bash-4.2$ which dfind
/usr/tce/packages/mpifileutils/mpifileutils-0.10/bin/dfind

bash-4.2$ dfind --input /p/lustre3/faaland1/vast.dwalk.mpfu /p/vast1/faaland1/  --name '*test*'            

Usage: dfind [options] <path> EXPRESSIONS...

Options:
  -i, --input <file>                      - read list from file
  -o, --output <file>                     - write processed list to file
  -v, --verbose                           - verbose output
  -q, --quiet                             - quiet output
  -h, --help                              - print usage

Tests:
  --amin N       - last accessed N minutes ago
  --anewer FILE  - last accessed more recently than FILE modified
  --atime N      - last accessed N days ago
  --cmin N       - status last changed N minutes ago
  --cnewer FILE  - status last changed more recently than FILE modified
  --ctime N      - status last changed N days ago
  --mmin N       - data last modified N minutes ago
  --newer FILE   - modified more recently than FILE
  --mtime N      - data last modified N days ago

  --gid N        - numeric group ID is N
  --group NAME   - belongs to group NAME
  --uid N        - numeric user ID is N
  --user NAME    - owned by user NAME

  --name PATTERN - base name matches shell pattern PATTERN
  --path PATTERN - full path matches shell pattern PATTERN
  --regex REGEX  - full path matches POSIX regex REGEX

  --size N       - size is N bytes.  Supports attached units like KB, MB, GB
  --type C       - of type C: d=dir, f=file, l=symlink

  Tests with N can use -N (less than N), N (exactly N), +N (more than N)

Actions:
  --print        - print item name to stdout
  --exec CMD ;   - execute CMD on item

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the shown dfind command and start at the command-line argument parsing entry point. Trace how invalid arguments produce the usage message; done means the output identifies the invalid argument(s) and the command exits with a nonzero status.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.