I am getting this error while opening /etc/profile
file using nano.
Error reading lock file /etc/.profile.swp: Not enough data read
How can I fix this?
Zanna♦
69.3k56 gold badges217 silver badges327 bronze badges
asked Jul 25, 2017 at 9:12
5
Try to remove the hidden file .[yourfilename].swp
, which is stored in the same folder as the file that you are trying to open.
In your case try the shell command rm /etc/.profile.swp
.
This issue also occurs with nano 2.7.4, and must be something to do with how nano handles a corrupted swapfile.
Hope this helped
storm
4,9436 gold badges35 silver badges48 bronze badges
answered Sep 21, 2017 at 8:50
sunwalkersunwalker
5813 silver badges2 bronze badges
1
The problem is linked to a bug in an older version of nano
as seen here.
As per the report, the affected version was nano-2.4.2
. You should run nano --version
to ascertain your current version and update accordingly.
A more detailed report of the actual issue can be found here.
answered Jul 25, 2017 at 9:47
2
Was happening for me because I was out of disk space, I cleared up some space, deleted the swap file and it worked.
answered Dec 8, 2017 at 20:04
AnthonyAnthony
1311 silver badge3 bronze badges
This happened for me because of a log file that wasn’t rotating, it took the entire disk space, I solved it by truncating this log file, then removing the .swp file.
answered Aug 25, 2019 at 6:47
AyuMuAyuMu
111 bronze badge
0
Please try this one (run this on the current folder):
find . -name "*.swp" -delete
Keep in mind that as @pbhj commented:
[…] this will find all files below the current root, ending in .swp, and delete them. Which should work to remove temporary nano files, but might have unintended consequences.
answered Sep 6, 2022 at 20:38
2
For me this was because of running docker container logs.
Worked fine after deleting them.
Logs location: /var/lib/docker/containers/
rm -rf /var/lib/docker/containers/*
Note: this will delete all the log generated till today, you may choose to deleted not required and also take backup to avoid logs data loss.
answered May 23, 2022 at 8:44
You must log in to answer this question.
Not the answer you’re looking for? Browse other questions tagged
.
Not the answer you’re looking for? Browse other questions tagged
.
Я получил такую ошибку при открытии файла /My_file/.main.cpp
открывал с помощью программы nano.
Error reading lock file /My_file/.main.cpp.swp: Not enough data read
Как мне это исправить ??
задан 30 мая 2019 в 10:53
timob256timob256
2,8996 золотых знаков41 серебряный знак82 бронзовых знака
Надо удалить скрытый файл. .[Твой_файл].swp
, который хранится в той же папке что и файл который я пытаюсь открыть.
Надо воспользоваться командой shell-a и удалить этот скрытый файл командой
# rm /My_file/.main.cpp.swp
Эта проблема возникает в nano 2.7.4 (по крайней мере у меня такая версия) и должна быть связана с тем, как nano обрабатывает поврежденный файл подкачки. Хотя её она бывает связана с нехваткой памяти.
ответ дан 30 мая 2019 в 10:53
timob256timob256
2,8996 золотых знаков41 серебряный знак82 бронзовых знака
Я получаю эту ошибку при открытии /etc/profile
файл с помощью нано.
Error reading lock file /etc/.profile.swp: Not enough data read
Как я могу зафиксировать это?
задан
20 September 2018 в 12:00
поделиться
4 ответа
Попробуйте удалить скрытый файл . [Yourfilename] .swp
, который хранится в той же папке, что и файл, который вы пытаетесь открыть.
В вашем случае попробуйте команду оболочки rm /etc/.profile.swp
.
Эта проблема также возникает с nano 2.7.4 и должна быть связана с тем, как nano обрабатывает поврежденный файл подкачки.
Надеюсь, это помогло
ответ дан storm
23 November 2019 в 01:51
поделиться
Проблема связана с ошибкой в более старой версии nano
, как показано здесь .
Согласно отчету, уязвимая версия было нано-2.4.2
. Вы должны запустить nano --version
, чтобы узнать текущую версию и обновить ее соответствующим образом.
Более подробный отчет о реальной проблеме можно найти здесь .
ответ дан The Pizza Overlord
23 November 2019 в 01:51
поделиться
Это случилось со мной, потому что у меня не было дискового пространства, я очистил некоторое пространство, удалил файл подкачки, и это сработало.
ответ дан Anthony
23 November 2019 в 01:51
поделиться
Это случилось со мной из-за того, что файл журнала не вращался, он занимал все место на диске, я решил это, усекнув этот файл журнала, а затем удалив файл .swp.
ответ дан AyuMu
23 November 2019 в 01:51
поделиться
Другие вопросы по тегам:
Похожие вопросы:
I am getting this error while opening /etc/profile
file using nano.
Error reading lock file /etc/.profile.swp: Not enough data read
How can I fix this?
Zanna♦
69.3k56 gold badges217 silver badges327 bronze badges
asked Jul 25, 2017 at 9:12
5
Try to remove the hidden file .[yourfilename].swp
, which is stored in the same folder as the file that you are trying to open.
In your case try the shell command rm /etc/.profile.swp
.
This issue also occurs with nano 2.7.4, and must be something to do with how nano handles a corrupted swapfile.
Hope this helped
storm
4,9436 gold badges35 silver badges48 bronze badges
answered Sep 21, 2017 at 8:50
sunwalkersunwalker
5813 silver badges2 bronze badges
1
The problem is linked to a bug in an older version of nano
as seen here.
As per the report, the affected version was nano-2.4.2
. You should run nano --version
to ascertain your current version and update accordingly.
A more detailed report of the actual issue can be found here.
answered Jul 25, 2017 at 9:47
2
Was happening for me because I was out of disk space, I cleared up some space, deleted the swap file and it worked.
answered Dec 8, 2017 at 20:04
AnthonyAnthony
1311 silver badge3 bronze badges
This happened for me because of a log file that wasn’t rotating, it took the entire disk space, I solved it by truncating this log file, then removing the .swp file.
answered Aug 25, 2019 at 6:47
AyuMuAyuMu
111 bronze badge
0
Please try this one (run this on the current folder):
find . -name "*.swp" -delete
Keep in mind that as @pbhj commented:
[…] this will find all files below the current root, ending in .swp, and delete them. Which should work to remove temporary nano files, but might have unintended consequences.
answered Sep 6, 2022 at 20:38
2
For me this was because of running docker container logs.
Worked fine after deleting them.
Logs location: /var/lib/docker/containers/
rm -rf /var/lib/docker/containers/*
Note: this will delete all the log generated till today, you may choose to deleted not required and also take backup to avoid logs data loss.
answered May 23, 2022 at 8:44
You must log in to answer this question.
Not the answer you’re looking for? Browse other questions tagged
.
Not the answer you’re looking for? Browse other questions tagged
.
Я получаю эту ошибку при открытии /etc/profile
файл с использованием нано.
Error reading lock file /etc/.profile.swp: Not enough data read
Как я могу это исправить?
2017-07-25 09:12
6
ответов
Попробуйте удалить скрытый файл .[yourfilename].swp
, который хранится в той же папке, что и файл, который вы пытаетесь открыть.
В вашем случае попробуйте команду оболочки rm /etc/.profile.swp
,
Эта проблема также возникает в nano 2.7.4 и должна быть связана с тем, как nano обрабатывает поврежденный файл подкачки.
Надеюсь, это помогло
sunwalker
21 сен ’17 в 08:50
2017-09-21 08:50
2017-09-21 08:50
Проблема связана с ошибкой в старой версии nano
как видно здесь.
Согласно отчету, уязвимая версия была nano-2.4.2
, Ты должен бежать nano --version
чтобы узнать вашу текущую версию и обновить соответственно.
Более подробный отчет о фактической проблеме можно найти здесь.
2017-07-25 09:47
Это происходило для меня, потому что у меня не было места на диске, я очистил немного места, удалил файл подкачки, и это сработало.
Antoine
08 дек ’17 в 20:04
2017-12-08 20:04
2017-12-08 20:04
Примерьте вот это
find . -name "*.swp" -delete
2022-09-06 20:38
Это произошло для меня из-за файла журнала, который не вращался, он занял все дисковое пространство, я решил это, обрезав этот файл журнала, а затем удалив файл.swp.
AyuMu
25 авг ’19 в 09:47
2019-08-25 09:47
2019-08-25 09:47
Для меня это было из-за запуска журналов контейнера докеров. Работал нормально после их удаления. Расположение журналов:
/var/lib/docker/containers/
rm -rf /var/lib/docker/containers/*
Примечание: это приведет к удалению всего журнала, созданного до сегодняшнего дня, вы можете выбрать удаление без необходимости, а также сделать резервную копию, чтобы избежать потери данных журналов.
2022-05-23 08:44
Другие вопросы по тегам
nano