Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upUnsafe rm -rf example in documentation #473
Comments
This comment has been minimized.
This comment has been minimized.
|
I was thinking about this when writing it, but the problem is that we don't want to remove the directory itself, just its contents. Hmm... |
This comment has been minimized.
This comment has been minimized.
|
What happens when you test this on someone else's box: |
This comment has been minimized.
This comment has been minimized.
|
As this is just an example, there is no need to use an environment variable. The fact that storage path is supposed to be replaced by the actual content can be shown in a safer way as well, although not as elegant as with a bash variable. For example: rm -rf /path/to/storage/* |
This comment has been minimized.
This comment has been minimized.
|
Note: The syntax within carrots (<>) is consistent with replaceable syntax on page http://prometheus.github.io/docs/concepts/data_model/#notation. That said, is the most consistent because it does not contain a hyphen. |
This comment has been minimized.
This comment has been minimized.
|
How about |
This comment has been minimized.
This comment has been minimized.
|
(and most importantly, if someone just copies the line without replacing anything, it will result in a syntax error) |
This comment has been minimized.
This comment has been minimized.
|
Done. |
This comment has been minimized.
This comment has been minimized.
|
+1 |
juliusv
closed this
Jan 27, 2015
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 24, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
osg commentedJan 26, 2015
At http://prometheus.github.io/docs/operating/storage/, the
rm -rf $STORAGE_PATH/*example is unsafe.Alternative:
rm -r ${STORAGE_PATH}