Skip to content

Commit

Permalink
mod README
Browse files Browse the repository at this point in the history
  • Loading branch information
catatsuy committed Sep 18, 2021
1 parent 0f58cb4 commit 66401fb
Showing 1 changed file with 1 addition and 35 deletions.
36 changes: 1 addition & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,4 @@ $ lls > output.txt
$ lls / > output.txt
```

If you want to reduce the memory usage, you can specify the `-buf-size` option. If the size you specify is smaller than the actual size needed, you will not get the full file list.

## FAQs

### Q: I can't run lls

If the size of the directory (`ls -dl`) is larger than 2GB, you may get the following error.

```
$ lls
invalid argument
```

You can specify the size of the buffer by passing the `-buf-size` option. You can specify `2147483647`, which is 1 byte smaller than 2GB.

```
$ lls -buf-size 2147483647
```

### Q: I can't get a list of all files

Maybe the size of the buffer is too small.

For example, you run `lls -debug` and get the following output.

```
$ lls -debug
bufSize: 4096; getdents ret: 4080
```

The `bufSize` is the actual size of the buffer passed to the system call, and `getdents ret` is the return value of the getdents system call, which is the number of bytes actually used in the buffer.

It consumes about `(20+filename) bytes` per file. If the difference between these two numbers is less than one file, it is possible that there are still other files, but we are not able to list all of them.

If you give a larger number to the `-buf-size` option, you should get a list of all files.
If you want to change the memory usage, you can specify the `-buf-size` option (default: 5MB).

0 comments on commit 66401fb

Please sign in to comment.