How do I find all files that end with a dotFind all files on the filesystem that I have edited or createdHow...
Can I sign legal documents with a smiley face?
Which one is correct as adjective “protruding” or “protruded”?
Why Shazam when there is already Superman?
Store Credit Card Information in Password Manager?
Is this toilet slogan correct usage of the English language?
dpdt switch to spst switch
What was the exact wording from Ivanhoe of this advice on how to free yourself from slavery?
When were female captains banned from Starfleet?
Has any country ever had 2 former presidents in jail simultaneously?
Travelling outside the UK without a passport
How do you make your own symbol when Detexify fails?
How much character growth crosses the line into breaking the character
What is this cable/device?
Removing files under particular conditions (number of files, file age)
Should I outline or discovery write my stories?
Strong empirical falsification of quantum mechanics based on vacuum energy density
It grows, but water kills it
copy and scale one figure (wheel)
How to explain what's wrong with this application of the chain rule?
Why did the EU agree to delay the Brexit deadline?
How to bake one texture for one mesh with multiple textures blender 2.8
How to implement a feedback to keep the DC gain at zero for this conceptual passive filter?
Added a new user on Ubuntu, set password not working?
Why does the Sun have different day lengths, but not the gas giants?
How do I find all files that end with a dot
Find all files on the filesystem that I have edited or createdHow to find all the files related to a software?Find all files modified by a specific userHow to recover files lost in Xubuntu installation?Cant delete folders with files in it:Find all files with specific extensions that contains a stringHow to remove files with no permission?How to delete all ._ files?Delete all files with a patternHow to clear all files in a folder ending with `.log`?
How do I find all files that end with a "." (dot) and then delete them? Is there a program that can do this?
Example:
Desktop DB.
mp600osxpd542ej7.
files
New contributor
add a comment |
How do I find all files that end with a "." (dot) and then delete them? Is there a program that can do this?
Example:
Desktop DB.
mp600osxpd542ej7.
files
New contributor
find -name *. -delete
maybe
– guiverc
4 hours ago
I would to list the files first so that I don't delete something that I want to keep.
– Kathryn Trucano
3 hours ago
I would never run a command like that first time with a -delete option; run it without the delete so it just finds the files, and you can peruse the files it will delete, then only when happy add the -delete option).find
finds files by name, date, permissions or anything, but you can also tell it to execute something for each file, delete them etc. It's a standard *nix command from 1978
– guiverc
3 hours ago
Do you need this to delete plain files only - or directories as well? does it need to be recursive or just files at one directory level?
– steeldriver
3 hours ago
add a comment |
How do I find all files that end with a "." (dot) and then delete them? Is there a program that can do this?
Example:
Desktop DB.
mp600osxpd542ej7.
files
New contributor
How do I find all files that end with a "." (dot) and then delete them? Is there a program that can do this?
Example:
Desktop DB.
mp600osxpd542ej7.
files
files
New contributor
New contributor
New contributor
asked 4 hours ago
Kathryn TrucanoKathryn Trucano
61
61
New contributor
New contributor
find -name *. -delete
maybe
– guiverc
4 hours ago
I would to list the files first so that I don't delete something that I want to keep.
– Kathryn Trucano
3 hours ago
I would never run a command like that first time with a -delete option; run it without the delete so it just finds the files, and you can peruse the files it will delete, then only when happy add the -delete option).find
finds files by name, date, permissions or anything, but you can also tell it to execute something for each file, delete them etc. It's a standard *nix command from 1978
– guiverc
3 hours ago
Do you need this to delete plain files only - or directories as well? does it need to be recursive or just files at one directory level?
– steeldriver
3 hours ago
add a comment |
find -name *. -delete
maybe
– guiverc
4 hours ago
I would to list the files first so that I don't delete something that I want to keep.
– Kathryn Trucano
3 hours ago
I would never run a command like that first time with a -delete option; run it without the delete so it just finds the files, and you can peruse the files it will delete, then only when happy add the -delete option).find
finds files by name, date, permissions or anything, but you can also tell it to execute something for each file, delete them etc. It's a standard *nix command from 1978
– guiverc
3 hours ago
Do you need this to delete plain files only - or directories as well? does it need to be recursive or just files at one directory level?
– steeldriver
3 hours ago
find -name *. -delete
maybe– guiverc
4 hours ago
find -name *. -delete
maybe– guiverc
4 hours ago
I would to list the files first so that I don't delete something that I want to keep.
– Kathryn Trucano
3 hours ago
I would to list the files first so that I don't delete something that I want to keep.
– Kathryn Trucano
3 hours ago
I would never run a command like that first time with a -delete option; run it without the delete so it just finds the files, and you can peruse the files it will delete, then only when happy add the -delete option).
find
finds files by name, date, permissions or anything, but you can also tell it to execute something for each file, delete them etc. It's a standard *nix command from 1978– guiverc
3 hours ago
I would never run a command like that first time with a -delete option; run it without the delete so it just finds the files, and you can peruse the files it will delete, then only when happy add the -delete option).
find
finds files by name, date, permissions or anything, but you can also tell it to execute something for each file, delete them etc. It's a standard *nix command from 1978– guiverc
3 hours ago
Do you need this to delete plain files only - or directories as well? does it need to be recursive or just files at one directory level?
– steeldriver
3 hours ago
Do you need this to delete plain files only - or directories as well? does it need to be recursive or just files at one directory level?
– steeldriver
3 hours ago
add a comment |
2 Answers
2
active
oldest
votes
The following cmd will do:
find . -type f -name '*.' -exec rm -i {} ;
cmd explanation:
find
: the utility we used to search for files and perform actions on them.
-type f
:that makes sure that we find files only
-name '*.'
: that tellfind
to pick up files with names that match the pattern, which has a wildcard *, that matches any number of characters, followed by the dot we're looking for.
note that we quoted the pattern, this is important to avoid the expansion of the wildcard by the shell.
-exec
: that tells find to perform the following action on the files that have been found.
rm -i {}
: the cmdrm -i
removes files interactively, which means that it will ask you any time, it wants to delete a file, that's a good option if you want to check your files one by one before deletion, otherwise you can omit the option-i
.
the curly braces are placeholders for the files found byfind
.- finally we end the command executed by find with an escaped semicolon
;
New contributor
add a comment |
find -name "*." -delete
find will locate files named pattern '*.' (ie. end in a dot) & delete them. The use of -delete also implies -depth too, but adjust to your needs.
Quotes added as I'd forgotten, thanks @steeldriver
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Kathryn Trucano is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1128144%2fhow-do-i-find-all-files-that-end-with-a-dot%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The following cmd will do:
find . -type f -name '*.' -exec rm -i {} ;
cmd explanation:
find
: the utility we used to search for files and perform actions on them.
-type f
:that makes sure that we find files only
-name '*.'
: that tellfind
to pick up files with names that match the pattern, which has a wildcard *, that matches any number of characters, followed by the dot we're looking for.
note that we quoted the pattern, this is important to avoid the expansion of the wildcard by the shell.
-exec
: that tells find to perform the following action on the files that have been found.
rm -i {}
: the cmdrm -i
removes files interactively, which means that it will ask you any time, it wants to delete a file, that's a good option if you want to check your files one by one before deletion, otherwise you can omit the option-i
.
the curly braces are placeholders for the files found byfind
.- finally we end the command executed by find with an escaped semicolon
;
New contributor
add a comment |
The following cmd will do:
find . -type f -name '*.' -exec rm -i {} ;
cmd explanation:
find
: the utility we used to search for files and perform actions on them.
-type f
:that makes sure that we find files only
-name '*.'
: that tellfind
to pick up files with names that match the pattern, which has a wildcard *, that matches any number of characters, followed by the dot we're looking for.
note that we quoted the pattern, this is important to avoid the expansion of the wildcard by the shell.
-exec
: that tells find to perform the following action on the files that have been found.
rm -i {}
: the cmdrm -i
removes files interactively, which means that it will ask you any time, it wants to delete a file, that's a good option if you want to check your files one by one before deletion, otherwise you can omit the option-i
.
the curly braces are placeholders for the files found byfind
.- finally we end the command executed by find with an escaped semicolon
;
New contributor
add a comment |
The following cmd will do:
find . -type f -name '*.' -exec rm -i {} ;
cmd explanation:
find
: the utility we used to search for files and perform actions on them.
-type f
:that makes sure that we find files only
-name '*.'
: that tellfind
to pick up files with names that match the pattern, which has a wildcard *, that matches any number of characters, followed by the dot we're looking for.
note that we quoted the pattern, this is important to avoid the expansion of the wildcard by the shell.
-exec
: that tells find to perform the following action on the files that have been found.
rm -i {}
: the cmdrm -i
removes files interactively, which means that it will ask you any time, it wants to delete a file, that's a good option if you want to check your files one by one before deletion, otherwise you can omit the option-i
.
the curly braces are placeholders for the files found byfind
.- finally we end the command executed by find with an escaped semicolon
;
New contributor
The following cmd will do:
find . -type f -name '*.' -exec rm -i {} ;
cmd explanation:
find
: the utility we used to search for files and perform actions on them.
-type f
:that makes sure that we find files only
-name '*.'
: that tellfind
to pick up files with names that match the pattern, which has a wildcard *, that matches any number of characters, followed by the dot we're looking for.
note that we quoted the pattern, this is important to avoid the expansion of the wildcard by the shell.
-exec
: that tells find to perform the following action on the files that have been found.
rm -i {}
: the cmdrm -i
removes files interactively, which means that it will ask you any time, it wants to delete a file, that's a good option if you want to check your files one by one before deletion, otherwise you can omit the option-i
.
the curly braces are placeholders for the files found byfind
.- finally we end the command executed by find with an escaped semicolon
;
New contributor
New contributor
answered 2 hours ago
HElanabiHElanabi
392
392
New contributor
New contributor
add a comment |
add a comment |
find -name "*." -delete
find will locate files named pattern '*.' (ie. end in a dot) & delete them. The use of -delete also implies -depth too, but adjust to your needs.
Quotes added as I'd forgotten, thanks @steeldriver
add a comment |
find -name "*." -delete
find will locate files named pattern '*.' (ie. end in a dot) & delete them. The use of -delete also implies -depth too, but adjust to your needs.
Quotes added as I'd forgotten, thanks @steeldriver
add a comment |
find -name "*." -delete
find will locate files named pattern '*.' (ie. end in a dot) & delete them. The use of -delete also implies -depth too, but adjust to your needs.
Quotes added as I'd forgotten, thanks @steeldriver
find -name "*." -delete
find will locate files named pattern '*.' (ie. end in a dot) & delete them. The use of -delete also implies -depth too, but adjust to your needs.
Quotes added as I'd forgotten, thanks @steeldriver
edited 3 hours ago
answered 4 hours ago
guivercguiverc
5,02121623
5,02121623
add a comment |
add a comment |
Kathryn Trucano is a new contributor. Be nice, and check out our Code of Conduct.
Kathryn Trucano is a new contributor. Be nice, and check out our Code of Conduct.
Kathryn Trucano is a new contributor. Be nice, and check out our Code of Conduct.
Kathryn Trucano is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1128144%2fhow-do-i-find-all-files-that-end-with-a-dot%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
find -name *. -delete
maybe– guiverc
4 hours ago
I would to list the files first so that I don't delete something that I want to keep.
– Kathryn Trucano
3 hours ago
I would never run a command like that first time with a -delete option; run it without the delete so it just finds the files, and you can peruse the files it will delete, then only when happy add the -delete option).
find
finds files by name, date, permissions or anything, but you can also tell it to execute something for each file, delete them etc. It's a standard *nix command from 1978– guiverc
3 hours ago
Do you need this to delete plain files only - or directories as well? does it need to be recursive or just files at one directory level?
– steeldriver
3 hours ago