Ошибка чтения файла блокировки недостаточно данных прочитано linux

Ошибка чтения файла блокировки недостаточно данных прочитано linux

Я получил такую ошибку при открытии файла /My_file/.main.cpp открывал с помощью программы nano.

Error reading lock file /My_file/.main.cpp.swp: Not enough data read 

2,879 5 золотых знаков 39 серебряных знаков 74 бронзовых знака

Надо удалить скрытый файл. .[Твой_файл].swp , который хранится в той же папке что и файл который я пытаюсь открыть.

Надо воспользоваться командой shell-a и удалить этот скрытый файл командой

Эта проблема возникает в nano 2.7.4 (по крайней мере у меня такая версия) и должна быть связана с тем, как nano обрабатывает поврежденный файл подкачки. Хотя её она бывает связана с нехваткой памяти.

ответ дан 30 мая 2019 в 10:53

2,879 5 золотых знаков 39 серебряных знаков 74 бронзовых знака

Я получаю эту ошибку при открытии /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 

68.6k 55 gold badges 212 silver badges 322 bronze badges

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 .

Читайте также:  Linux send udp packets

This issue also occurs with nano 2.7.4, and must be something to do with how nano handles a corrupted swapfile.

4,903 6 gold badges 33 silver badges 48 bronze badges

answered Sep 21, 2017 at 8:50

551 3 silver badges 2 bronze badges

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

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

131 1 silver badge 3 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

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

Please try this one (run this on the current folder):

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

Я получил такую ошибку при открытии файла /My_file/.main.cpp открывал с помощью программы nano.

Error reading lock file /My_file/.main.cpp.swp: Not enough data read 

2,819 4 золотых знака 38 серебряных знаков 72 бронзовых знака

Надо удалить скрытый файл. .[Твой_файл].swp , который хранится в той же папке что и файл который я пытаюсь открыть.

Надо воспользоваться командой shell-a и удалить этот скрытый файл командой

Эта проблема возникает в nano 2.7.4 (по крайней мере у меня такая версия) и должна быть связана с тем, как nano обрабатывает поврежденный файл подкачки. Хотя её она бывает связана с нехваткой памяти.

ответ дан 30 мая 2019 в 10:53

2,819 4 золотых знака 38 серебряных знаков 72 бронзовых знака

@bbgeek17 Thank you for the reply. There is plenty of storage space on all drives, but you bring up a good point… There was an episode previously where syslog file overfilled the boot SSD with errors from an USB device. I deleted the syslog file, removed the device and all was forgotten. I wonder if the fstab.swp was created during this time and is a remnant of that issue? Based on your google search article, it sounds like the correct action is to rm the fstab.swp file. I will give it another 24hrs for other replies before I dare to delete an important system file and then report back to you.

Читайте также:  Настроить синхронизацию времени linux

I also attempted to edit etc/fstab with vi and received the following error thus supporting idea of fstab.swp file conflicting with fstab:

E325: ATTENTION Found a swap file by the name "/etc/.fstab.swp" owned by: root dated: Mon Jul 12 21:34:36 2021 [cannot be read] While opening file "/etc/fstab" dated: Wed Jun 2 20:04:31 2021 (1) Another program may be editing the same file. If this is the case, be careful not to end up with two different instances of the same file when making changes. Quit, or continue with caution. (2) An edit session for this file crashed. If this is the case, use ":recover" or "vim -r /etc/fstab" to recover the changes (see ":help recovery"). If you did this already, delete the swap file "/etc/.fstab.swp" to avoid this message. "/etc/fstab" 5 lines, 207 characters

In the end, I think your articles recommendation to delete .fstab.swp is the most logical. Maybe a mv command versus rm to start. Incidentally, I did a DuckDuckGo search and that article did not appear. Maybe I should start using Google again.

I am getting this error while opening /etc/profile file using nano.

Error reading lock file /etc/.profile.swp: Not enough data read 

68.1k 55 gold badges 209 silver badges 319 bronze badges

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.

4,883 6 gold badges 33 silver badges 48 bronze badges

answered Sep 21, 2017 at 8:50

551 3 silver badges 2 bronze badges

Источник

Ошибка чтения файла блокировки etc fstab swp недостаточно данных прочитано

Я получил такую ошибку при открытии файла /My_file/.main.cpp открывал с помощью программы nano. Error reading lock file /My_file/.main.cpp.swp: Not enough data read Как мне это исправить ??

Читайте также:  Virtualbox общие папки windows 10 linux

Я получил такую ошибку при открытии файла /My_file/.main.cpp открывал с помощью программы nano.

Error reading lock file /My_file/.main.cpp.swp: Not enough data read 

2,819 4 золотых знака 38 серебряных знаков 72 бронзовых знака

Надо удалить скрытый файл. .[Твой_файл].swp , который хранится в той же папке что и файл который я пытаюсь открыть.

Надо воспользоваться командой shell-a и удалить этот скрытый файл командой

Эта проблема возникает в nano 2.7.4 (по крайней мере у меня такая версия) и должна быть связана с тем, как nano обрабатывает поврежденный файл подкачки. Хотя её она бывает связана с нехваткой памяти.

ответ дан 30 мая 2019 в 10:53

2,819 4 золотых знака 38 серебряных знаков 72 бронзовых знака

@bbgeek17 Thank you for the reply. There is plenty of storage space on all drives, but you bring up a good point… There was an episode previously where syslog file overfilled the boot SSD with errors from an USB device. I deleted the syslog file, removed the device and all was forgotten. I wonder if the fstab.swp was created during this time and is a remnant of that issue? Based on your google search article, it sounds like the correct action is to rm the fstab.swp file. I will give it another 24hrs for other replies before I dare to delete an important system file and then report back to you.

I also attempted to edit etc/fstab with vi and received the following error thus supporting idea of fstab.swp file conflicting with fstab:

E325: ATTENTION Found a swap file by the name "/etc/.fstab.swp" owned by: root dated: Mon Jul 12 21:34:36 2021 [cannot be read] While opening file "/etc/fstab" dated: Wed Jun 2 20:04:31 2021 (1) Another program may be editing the same file. If this is the case, be careful not to end up with two different instances of the same file when making changes. Quit, or continue with caution. (2) An edit session for this file crashed. If this is the case, use ":recover" or "vim -r /etc/fstab" to recover the changes (see ":help recovery"). If you did this already, delete the swap file "/etc/.fstab.swp" to avoid this message. "/etc/fstab" 5 lines, 207 characters

In the end, I think your articles recommendation to delete .fstab.swp is the most logical. Maybe a mv command versus rm to start. Incidentally, I did a DuckDuckGo search and that article did not appear. Maybe I should start using Google again.

Источник

Оцените статью
Adblock
detector