How do I use yes with e2fsck?
up vote
3
down vote
favorite
I have tried the following with both LinuxMint 13 Cinnamon 32 bit and Trisquel 7.0 Gnome 32 bit and get the same error message:
$ yes | sudo e2fsck /dev/sdax
e2fsck 1.42 (29-Nov-2011)
e2fsck: need terminal for interactive repairs
In each case, the partition /dev/sdax was not mounted.
Is it not possible to use yes with e2fsck?
linux e2fsck
add a comment |
up vote
3
down vote
favorite
I have tried the following with both LinuxMint 13 Cinnamon 32 bit and Trisquel 7.0 Gnome 32 bit and get the same error message:
$ yes | sudo e2fsck /dev/sdax
e2fsck 1.42 (29-Nov-2011)
e2fsck: need terminal for interactive repairs
In each case, the partition /dev/sdax was not mounted.
Is it not possible to use yes with e2fsck?
linux e2fsck
yes - output a string repeatedly until killed
what is the reason to use it here?
– Costas
Jan 20 '15 at 12:06
3
Based on the error message, I guess it insists on a terminal. Could you trick it in order to be able to useyes
with it? Maybe, but you don't need to: it already has a-y
option that does the same thing.
– Celada
Jan 20 '15 at 12:06
@Costas: I'd much rather have a program keep feeding 'y' to e2fsck than having to type it over and over again when there are file system errors.
– Don Nadie
Jan 22 '15 at 16:32
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I have tried the following with both LinuxMint 13 Cinnamon 32 bit and Trisquel 7.0 Gnome 32 bit and get the same error message:
$ yes | sudo e2fsck /dev/sdax
e2fsck 1.42 (29-Nov-2011)
e2fsck: need terminal for interactive repairs
In each case, the partition /dev/sdax was not mounted.
Is it not possible to use yes with e2fsck?
linux e2fsck
I have tried the following with both LinuxMint 13 Cinnamon 32 bit and Trisquel 7.0 Gnome 32 bit and get the same error message:
$ yes | sudo e2fsck /dev/sdax
e2fsck 1.42 (29-Nov-2011)
e2fsck: need terminal for interactive repairs
In each case, the partition /dev/sdax was not mounted.
Is it not possible to use yes with e2fsck?
linux e2fsck
linux e2fsck
asked Jan 20 '15 at 12:03
Don Nadie
5017
5017
yes - output a string repeatedly until killed
what is the reason to use it here?
– Costas
Jan 20 '15 at 12:06
3
Based on the error message, I guess it insists on a terminal. Could you trick it in order to be able to useyes
with it? Maybe, but you don't need to: it already has a-y
option that does the same thing.
– Celada
Jan 20 '15 at 12:06
@Costas: I'd much rather have a program keep feeding 'y' to e2fsck than having to type it over and over again when there are file system errors.
– Don Nadie
Jan 22 '15 at 16:32
add a comment |
yes - output a string repeatedly until killed
what is the reason to use it here?
– Costas
Jan 20 '15 at 12:06
3
Based on the error message, I guess it insists on a terminal. Could you trick it in order to be able to useyes
with it? Maybe, but you don't need to: it already has a-y
option that does the same thing.
– Celada
Jan 20 '15 at 12:06
@Costas: I'd much rather have a program keep feeding 'y' to e2fsck than having to type it over and over again when there are file system errors.
– Don Nadie
Jan 22 '15 at 16:32
yes - output a string repeatedly until killed
what is the reason to use it here?– Costas
Jan 20 '15 at 12:06
yes - output a string repeatedly until killed
what is the reason to use it here?– Costas
Jan 20 '15 at 12:06
3
3
Based on the error message, I guess it insists on a terminal. Could you trick it in order to be able to use
yes
with it? Maybe, but you don't need to: it already has a -y
option that does the same thing.– Celada
Jan 20 '15 at 12:06
Based on the error message, I guess it insists on a terminal. Could you trick it in order to be able to use
yes
with it? Maybe, but you don't need to: it already has a -y
option that does the same thing.– Celada
Jan 20 '15 at 12:06
@Costas: I'd much rather have a program keep feeding 'y' to e2fsck than having to type it over and over again when there are file system errors.
– Don Nadie
Jan 22 '15 at 16:32
@Costas: I'd much rather have a program keep feeding 'y' to e2fsck than having to type it over and over again when there are file system errors.
– Don Nadie
Jan 22 '15 at 16:32
add a comment |
4 Answers
4
active
oldest
votes
up vote
9
down vote
If you are sceptical whether e2fsck -y
works for you next time, coins might help.
I used to use this trick when there were no yes
or -y
or equivalent options in MS-DOS.
add a comment |
up vote
0
down vote
Try using
sudo e2fsck -y /dev/sdax
2
The first solution is exactly equivalent to the nonworking example in the question (other than outputting "yes" instead of "y," which won't make any difference in this case).
– Doorknob
Jan 20 '15 at 14:39
Yes, I have expected that but I couldn't check it on my drive. But sometimes small details make difference.
– Szymon Roziewski
Jan 20 '15 at 15:57
In the future, I'll try e2fsck -y /dev/sdax but really won't know if it does what I want until the next time I have file system errors and e2fsck repeatedly asks me if I want to perform its suggested fixes. e2fsck can suggest a lot of fixes when a file system is messed up; I just don't want to type 'y' over and over again when there are lots of errors.
– Don Nadie
Jan 22 '15 at 16:42
this answer is too short and is not adding anything to the previous answer
– aliceinwire
May 12 '17 at 10:52
add a comment |
up vote
0
down vote
You can try also:
sudo e2fsck -p /dev/sdax
See man e2fsck
for description of all arguments.
This is something, but it’s not what the question is asking for.
– G-Man
Jul 4 at 20:54
add a comment |
up vote
0
down vote
i had to enter "n" (don't abort) before "yes", so i used script
:
(echo n; yes) | script --return -c "e2fsck /dev/sda1"
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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
});
}
});
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%2funix.stackexchange.com%2fquestions%2f180036%2fhow-do-i-use-yes-with-e2fsck%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
9
down vote
If you are sceptical whether e2fsck -y
works for you next time, coins might help.
I used to use this trick when there were no yes
or -y
or equivalent options in MS-DOS.
add a comment |
up vote
9
down vote
If you are sceptical whether e2fsck -y
works for you next time, coins might help.
I used to use this trick when there were no yes
or -y
or equivalent options in MS-DOS.
add a comment |
up vote
9
down vote
up vote
9
down vote
If you are sceptical whether e2fsck -y
works for you next time, coins might help.
I used to use this trick when there were no yes
or -y
or equivalent options in MS-DOS.
If you are sceptical whether e2fsck -y
works for you next time, coins might help.
I used to use this trick when there were no yes
or -y
or equivalent options in MS-DOS.
edited Apr 13 '17 at 12:36
Community♦
1
1
answered Feb 10 '15 at 8:17
cychoi
285211
285211
add a comment |
add a comment |
up vote
0
down vote
Try using
sudo e2fsck -y /dev/sdax
2
The first solution is exactly equivalent to the nonworking example in the question (other than outputting "yes" instead of "y," which won't make any difference in this case).
– Doorknob
Jan 20 '15 at 14:39
Yes, I have expected that but I couldn't check it on my drive. But sometimes small details make difference.
– Szymon Roziewski
Jan 20 '15 at 15:57
In the future, I'll try e2fsck -y /dev/sdax but really won't know if it does what I want until the next time I have file system errors and e2fsck repeatedly asks me if I want to perform its suggested fixes. e2fsck can suggest a lot of fixes when a file system is messed up; I just don't want to type 'y' over and over again when there are lots of errors.
– Don Nadie
Jan 22 '15 at 16:42
this answer is too short and is not adding anything to the previous answer
– aliceinwire
May 12 '17 at 10:52
add a comment |
up vote
0
down vote
Try using
sudo e2fsck -y /dev/sdax
2
The first solution is exactly equivalent to the nonworking example in the question (other than outputting "yes" instead of "y," which won't make any difference in this case).
– Doorknob
Jan 20 '15 at 14:39
Yes, I have expected that but I couldn't check it on my drive. But sometimes small details make difference.
– Szymon Roziewski
Jan 20 '15 at 15:57
In the future, I'll try e2fsck -y /dev/sdax but really won't know if it does what I want until the next time I have file system errors and e2fsck repeatedly asks me if I want to perform its suggested fixes. e2fsck can suggest a lot of fixes when a file system is messed up; I just don't want to type 'y' over and over again when there are lots of errors.
– Don Nadie
Jan 22 '15 at 16:42
this answer is too short and is not adding anything to the previous answer
– aliceinwire
May 12 '17 at 10:52
add a comment |
up vote
0
down vote
up vote
0
down vote
Try using
sudo e2fsck -y /dev/sdax
Try using
sudo e2fsck -y /dev/sdax
edited Jan 20 '15 at 22:57
Gilles
525k12710491578
525k12710491578
answered Jan 20 '15 at 12:16
Szymon Roziewski
20013
20013
2
The first solution is exactly equivalent to the nonworking example in the question (other than outputting "yes" instead of "y," which won't make any difference in this case).
– Doorknob
Jan 20 '15 at 14:39
Yes, I have expected that but I couldn't check it on my drive. But sometimes small details make difference.
– Szymon Roziewski
Jan 20 '15 at 15:57
In the future, I'll try e2fsck -y /dev/sdax but really won't know if it does what I want until the next time I have file system errors and e2fsck repeatedly asks me if I want to perform its suggested fixes. e2fsck can suggest a lot of fixes when a file system is messed up; I just don't want to type 'y' over and over again when there are lots of errors.
– Don Nadie
Jan 22 '15 at 16:42
this answer is too short and is not adding anything to the previous answer
– aliceinwire
May 12 '17 at 10:52
add a comment |
2
The first solution is exactly equivalent to the nonworking example in the question (other than outputting "yes" instead of "y," which won't make any difference in this case).
– Doorknob
Jan 20 '15 at 14:39
Yes, I have expected that but I couldn't check it on my drive. But sometimes small details make difference.
– Szymon Roziewski
Jan 20 '15 at 15:57
In the future, I'll try e2fsck -y /dev/sdax but really won't know if it does what I want until the next time I have file system errors and e2fsck repeatedly asks me if I want to perform its suggested fixes. e2fsck can suggest a lot of fixes when a file system is messed up; I just don't want to type 'y' over and over again when there are lots of errors.
– Don Nadie
Jan 22 '15 at 16:42
this answer is too short and is not adding anything to the previous answer
– aliceinwire
May 12 '17 at 10:52
2
2
The first solution is exactly equivalent to the nonworking example in the question (other than outputting "yes" instead of "y," which won't make any difference in this case).
– Doorknob
Jan 20 '15 at 14:39
The first solution is exactly equivalent to the nonworking example in the question (other than outputting "yes" instead of "y," which won't make any difference in this case).
– Doorknob
Jan 20 '15 at 14:39
Yes, I have expected that but I couldn't check it on my drive. But sometimes small details make difference.
– Szymon Roziewski
Jan 20 '15 at 15:57
Yes, I have expected that but I couldn't check it on my drive. But sometimes small details make difference.
– Szymon Roziewski
Jan 20 '15 at 15:57
In the future, I'll try e2fsck -y /dev/sdax but really won't know if it does what I want until the next time I have file system errors and e2fsck repeatedly asks me if I want to perform its suggested fixes. e2fsck can suggest a lot of fixes when a file system is messed up; I just don't want to type 'y' over and over again when there are lots of errors.
– Don Nadie
Jan 22 '15 at 16:42
In the future, I'll try e2fsck -y /dev/sdax but really won't know if it does what I want until the next time I have file system errors and e2fsck repeatedly asks me if I want to perform its suggested fixes. e2fsck can suggest a lot of fixes when a file system is messed up; I just don't want to type 'y' over and over again when there are lots of errors.
– Don Nadie
Jan 22 '15 at 16:42
this answer is too short and is not adding anything to the previous answer
– aliceinwire
May 12 '17 at 10:52
this answer is too short and is not adding anything to the previous answer
– aliceinwire
May 12 '17 at 10:52
add a comment |
up vote
0
down vote
You can try also:
sudo e2fsck -p /dev/sdax
See man e2fsck
for description of all arguments.
This is something, but it’s not what the question is asking for.
– G-Man
Jul 4 at 20:54
add a comment |
up vote
0
down vote
You can try also:
sudo e2fsck -p /dev/sdax
See man e2fsck
for description of all arguments.
This is something, but it’s not what the question is asking for.
– G-Man
Jul 4 at 20:54
add a comment |
up vote
0
down vote
up vote
0
down vote
You can try also:
sudo e2fsck -p /dev/sdax
See man e2fsck
for description of all arguments.
You can try also:
sudo e2fsck -p /dev/sdax
See man e2fsck
for description of all arguments.
answered Jul 4 at 20:13
Joel Matějka
1
1
This is something, but it’s not what the question is asking for.
– G-Man
Jul 4 at 20:54
add a comment |
This is something, but it’s not what the question is asking for.
– G-Man
Jul 4 at 20:54
This is something, but it’s not what the question is asking for.
– G-Man
Jul 4 at 20:54
This is something, but it’s not what the question is asking for.
– G-Man
Jul 4 at 20:54
add a comment |
up vote
0
down vote
i had to enter "n" (don't abort) before "yes", so i used script
:
(echo n; yes) | script --return -c "e2fsck /dev/sda1"
add a comment |
up vote
0
down vote
i had to enter "n" (don't abort) before "yes", so i used script
:
(echo n; yes) | script --return -c "e2fsck /dev/sda1"
add a comment |
up vote
0
down vote
up vote
0
down vote
i had to enter "n" (don't abort) before "yes", so i used script
:
(echo n; yes) | script --return -c "e2fsck /dev/sda1"
i had to enter "n" (don't abort) before "yes", so i used script
:
(echo n; yes) | script --return -c "e2fsck /dev/sda1"
answered 2 days ago
Jayen
1368
1368
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2funix.stackexchange.com%2fquestions%2f180036%2fhow-do-i-use-yes-with-e2fsck%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
yes - output a string repeatedly until killed
what is the reason to use it here?– Costas
Jan 20 '15 at 12:06
3
Based on the error message, I guess it insists on a terminal. Could you trick it in order to be able to use
yes
with it? Maybe, but you don't need to: it already has a-y
option that does the same thing.– Celada
Jan 20 '15 at 12:06
@Costas: I'd much rather have a program keep feeding 'y' to e2fsck than having to type it over and over again when there are file system errors.
– Don Nadie
Jan 22 '15 at 16:32