This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if [ "$1" = "-h" ]; then | |
| printf "\n ./dup.sh arg1 arg2\n ./dup.sh -l <path>: for listing of duplicate files \n ./dup.sh -m <path>: for merging of duplicate files \n ./dup.sh -d <path>: for deleting of duplicate files\n Example:\n ./dup.sh -l /home/username/ will list all the duplicate files in /home/username directory \n ./dup.sh -m /home/username/ will merge all the duplicate files in /home/username directory \n ./dup.sh -d /home/username/ will delete all the duplicate files in /home/username directory\n" | |
| elif [ -n "$2" ]; then | |
| answer=$(find "$2" -type f -printf "%f %s\n"|sort -k1,1nr -k2,2n|uniq -d| cut -d" " -f1 ) | |
| if [ "$1" = "-l" ]; then | |
| for i in $answer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" | |
| android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" | |
| android:paddingRight="@dimen/activity_horizontal_margin" | |
| android:paddingTop="@dimen/activity_vertical_margin" | |
| android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".GhostActivity" | |
| android:id="@+id/ghost"> | |
| <TextView | |
| android:layout_width="wrap_content" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.google.engedu.ghost; | |
| import android.os.Bundle; | |
| import android.support.v7.app.ActionBarActivity; | |
| import android.view.KeyEvent; | |
| import android.view.View; | |
| import android.widget.TextView; | |
| import java.io.IOException; | |
| import java.util.Random; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.google.engedu.ghost; | |
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.InputStreamReader; | |
| import java.util.ArrayList; | |
| import java.util.Collections; | |
| import java.util.Comparator; | |
| import java.util.Random; |
NewerOlder