GithubHelp home page GithubHelp logo

Comments (5)

qarmin avatar qarmin commented on May 16, 2024 2

I think that disallowing users using this tool with super user privileges is bad, since users may want to search duplicates e.g. in /home folder to which doesn't have enough privileges as normal user.

Since Czkawka provide GUI frontend, CLI will be mostly used by more advanced users which will know that using delete flags will remove files.

I think that adding interactive mode should be used by default, and -d flag should be used only with -q quiet flag

from czkawka.

she3o avatar she3o commented on May 16, 2024 1

I was thinking of yay when the command refuses to run as a superuser but, interactive mode sounds better.

some advanced users might want czkawka to only print out dups by default (with -q and without -D). that would be the most unixy behavior. That way they can pipe | and overwrite > with the stdout.

from czkawka.

blob79 avatar blob79 commented on May 16, 2024

The situation is a bit better now. With #277 we have dryrun.

I didn't see the unix feature request in this ticket when I cut #258.

from czkawka.

wwalker avatar wwalker commented on May 16, 2024

@she3o is still correct. The help says:

@  $ czkawka_cli dup -h
Finds duplicate files
^^^^^

Finds is VERY different from Deletes by default

The help message really should be changed. It should at least say:
Finds and deletes duplicate files

And in the main help, the word delete is not used even once, although that is its default behavior. Essentially czkawka is a very powerful rm command. The primary description of rm is:

       rm - remove files or directories

There is no mention of remove or delete in the czkawka_cli help messages.

USAGE:
    czkawka_cli <COMMAND> [SCFLAGS] [SCOPTIONS]

OPTIONS:
  -h, --help     Print help
  -V, --version  Print version

SUBCOMMANDS:
  dup            Finds duplicate files
  empty-folders  Finds empty folders
  big            Finds big files
  empty-files    Finds empty files
  temp           Finds temporary files
  image          Finds similar images
  music          Finds same music by tags
  symlinks       Finds invalid symlinks
  broken         Finds broken files
  video          Finds similar video files
  ext            Finds files with invalid extensions
  tester         Small utility to test supported speed of
  help           Print this message or the help of the given subcommand(s)

from czkawka.

SkyWriter avatar SkyWriter commented on May 16, 2024

I am not sure if that's still the case. Here's reproduction of the original issue:

➜  TestTmp czkawka -h
czkawka 6.1.0
...
➜  TestTmp czkawka dup -h 
Finds duplicate files

Usage: czkawka dup [OPTIONS] --directories <DIRECTORIES>
...
  -D, --delete-method <DELETE_METHOD>
          Delete method (AEN, AEO, ON, OO, HARD) [default: NONE]
...
➜  TestTmp  dd if=/dev/urandom of=file-1 bs=64M count=16
16+0 records in                                                                                                                         
16+0 records out                 
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 3.40453 s, 315 MB/s
➜  TestTmp cp file-1 file-2                        
➜  TestTmp czkawka dup -d $PWD  
Results of searching ["/tank/enclave/TestTmp"] with excluded directories [] and excluded items []
-------------------------------------------------Files with same hashes-------------------------------------------------
Found 1 duplicated files which in 1 groups which takes 1 GiB.
                                                                    
---- Size 1 GiB (1073741824) - 2 files       
/tank/enclave/TestTmp/file-2                                   
/tank/enclave/TestTmp/file-1                               
-------------------------------MESSAGES--------------------------------
Properly saved to file 2 cache entries.        
Properly saved to file 2 cache entries.
---------------------------END OF MESSAGES-----------------------------
                                                                    
➜  TestTmp ls -la                    
total 2099106                                                   
drwxrwxr-x  2 sky sky            4 Nov 30 19:10 .
drwxrwxr-x 14 sky users         18 Nov 30 19:01 ..         
-rw-rw-r--  1 sky sky   1073741824 Nov 30 19:10 file-1
-rw-rw-r--  1 sky sky   1073741824 Nov 30 19:10 file-2 

Not deleting seems to be a clear default, and my experiment confirmed the behavior.

from czkawka.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.