スキップしてメイン コンテンツに移動

投稿

ラベル(cleanup)が付いた投稿を表示しています

Google Datastoreのインデックス削除

大昔にGoogle App Engineの開発で作成したGoogle Datastoreのインデックスを見つけたので掃除方法を検索したところ、公式の https://cloud.google.com/sdk/gcloud/reference/datastore/indexes/cleanup を見つけました。 筆者の場合は、インデックスを全削除したかったので、下記のような空のindex.yamlを作成し、 indexes: 下記のコマンドを実行しました。 gcloud datastore indexes cleanup index.yaml

Java: Remove Comments, Annotations and Extra Spaces From Source Code

I have written Java code for removing comments, annotations and extra spaces from Java source code. package com.dukesoftware.utils.text; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import com.dukesoftware.utils.io.IOUtils; public class JavaSourceUtils { public static void main(String[] args) throws FileNotFoundException, IOException { String cleanedUpSource = removeCommentAndAnnotation(IOUtils.userDirectory( "workspace2/DukeSoftwareUtils/src/main/java/com/dukesoftware/utils/text/JavaSourceUtils.java" )); System.out.println(cleanedUpSource); } public static final String removeCommentAndAnnotation(File file) throws IOException { try(BufferedReader br = new BufferedReader(new FileReader(file))) { return removeCommentAndAnnotation(br); } } private final static int COD

File Clean Up and Archiving Linux Command Tips

If you would like to delete files whose name ends with "batch.log" older than 30 days, Use the following command. find /var/log/ -name "*batch.log" -mtime +30 -type -f -delete If you would like to archive files whose name ends with "batch.log" older than 30 days, Use the following command. The archived file will have timestamp at the end of the filename. find /var/log/ -name "*batch.log" -mtime +30 -type -f -pront0 | tar -czvf /var/log/batch.log.tar.gz.`date +\%Y%m%d%H%M%S` -T - --null --remove-files