Post History
I want to remove all files with the ".part" extension in the current directory and its subdirectories, including files with the same name but different extension. Is this correct? find . -name '*...
#4: Post edited
Delete all files with the same name as the ones that end in `.part`
- Recursively remove files with the same name as the ones that end in `.part`
I want to find all files under the current directory that end in `.part` and delete them, along with all files with the same name even the ones with different extension.- Is this correct?
- ```
- find . -name '*.part' -exec sh -c 'base="$(basename "$1" .part)"; find . -name "$base*" -delete' sh {} \;
- ```
- I want to remove all files with the ".part" extension in the current directory and its subdirectories, including files with the same name but different extension.
- Is this correct?
- ```
- find . -name '*.part' -exec sh -c 'base="$(basename "$1" .part)"; find . -name "$base*" -delete' sh {} \;
- ```
#3: Post edited
- I want to find all files under the current directory that end in `.part` and delete them, along with all files with the same name even the ones with different extension.
- Is this correct?
> You can use the command `find` to search for files under the current directory that end in `.part` and delete them. The command to delete all files with the same name even the ones with different extension is> ```> find . -name '*.part' -exec sh -c 'base="$(basename "$1" .part)"; find . -name "$base*" -delete' sh {} \;> ```
- I want to find all files under the current directory that end in `.part` and delete them, along with all files with the same name even the ones with different extension.
- Is this correct?
- ```
- find . -name '*.part' -exec sh -c 'base="$(basename "$1" .part)"; find . -name "$base*" -delete' sh {} \;
- ```
#2: Post edited
- I want to find all files under the current directory that end in `.part` and delete them, along with all files with the same name even the ones with different extension.
Is this answer correct?- > You can use the command `find` to search for files under the current directory that end in `.part` and delete them. The command to delete all files with the same name even the ones with different extension is
- > ```
- > find . -name '*.part' -exec sh -c 'base="$(basename "$1" .part)"; find . -name "$base*" -delete' sh {} \;
- > ```
- I want to find all files under the current directory that end in `.part` and delete them, along with all files with the same name even the ones with different extension.
- Is this correct?
- > You can use the command `find` to search for files under the current directory that end in `.part` and delete them. The command to delete all files with the same name even the ones with different extension is
- > ```
- > find . -name '*.part' -exec sh -c 'base="$(basename "$1" .part)"; find . -name "$base*" -delete' sh {} \;
- > ```
#1: Initial revision
Delete all files with the same name as the ones that end in `.part`
I want to find all files under the current directory that end in `.part` and delete them, along with all files with the same name even the ones with different extension. Is this answer correct? > You can use the command `find` to search for files under the current directory that end in `.part` and delete them. The command to delete all files with the same name even the ones with different extension is > ``` > find . -name '*.part' -exec sh -c 'base="$(basename "$1" .part)"; find . -name "$base*" -delete' sh {} \; > ```