diff --git a/pages/common/tqdm.md b/pages/common/tqdm.md index e12a5ca47312a6..b440835cfc2a61 100644 --- a/pages/common/tqdm.md +++ b/pages/common/tqdm.md @@ -1,8 +1,20 @@ # tqdm -> Create a progress bar. +> Show progress over time of a command. > More information: . +- Show iterations per second and use `stdout` afterwards: + +`{{seq 10000000}} | tqdm | {{command}}` + - Create a progress bar: -`seq 10000000 | tqdm --total 10000000 --null` +`{{seq 10000000}} | tqdm --total {{10000000}} | {{command}}` + +- Create an archive out of a directory and use the file count of that directory to create a progress bar: + +`zip -r {{path/to/archive.zip}} {{path/to/directory}} | tqdm --total $(find {{path/to/directory}} | wc -l) --unit files --null` + +- Create an archive with tar and create a progress bar (system agnostic, GNU tar uses `stdout` while BSD tar uses `stderr`): + +`tar vzcf {{path/to/archive.tar.gz}} {{path/to/directory}} 2>&1 | tqdm --total $(find {{path/to/directory}} | wc -l) --unit files --null`