CLI options¶
--helpdisplays help--silentruns in silent mode. No output is generated on the console.--debugruns in debug mode. This applies to log files only. See also Configuring the logger.--traceruns in trace mode (more verbose than debug). This applies to log files only. See also Configuring the logger.--config_dirdefines directory where jobs are stored instead of default~/.fscrawler.--usernamedefines the username to use when using an secured version of elasticsearch cluster. Read Using Credentials (Security).--loop xdefines the number of runs we want before exiting. See Loop.--restartrestart a job from scratch. See Restart.--reststarts the REST service. See Rest.
Loop¶
New in version 2.2.
--loop x defines the number of runs we want before exiting:
Xwhere X is a negative value means infinite, like-1(default)0means that we don’t run any crawling job (useful when used with rest).Xwhere X is a positive value is the number of runs before it stops.
If you want to scan your hard drive only once, run with --loop 1.
Restart¶
New in version 2.2.
You can tell FSCrawler that it must restart from the beginning by using
--restart option:
bin/fscrawler job_name --restart
In that case, the {job_name}/_status.json file will be removed.
Rest¶
New in version 2.3.
If you want to run the REST service without scanning your hard drive, launch with:
bin/fscrawler --rest --loop 0