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

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

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

Как мне это исправить ??

задан 30 мая 2019 в 10:53

timob256's user avatar

timob256timob256

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

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

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

# rm /My_file/.main.cpp.swp

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

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

timob256's user avatar

timob256timob256

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

  • #3

@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:

Code:

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.

Thanks for your feedback!

Last edited: Sep 30, 2021

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's user avatar

Zanna

68.1k55 gold badges209 silver badges319 bronze badges

asked Jul 25, 2017 at 9:12

Vaibhav Phadke's user avatar

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's user avatar

storm

4,8836 gold badges33 silver badges48 bronze badges

answered Sep 21, 2017 at 8:50

sunwalker's user avatar

sunwalkersunwalker

5513 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

The Pizza Overlord's user avatar

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

Anthony's user avatar

AnthonyAnthony

1211 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

AyuMu's user avatar

AyuMuAyuMu

111 bronze badge

0

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

Sunil Dhayal's user avatar

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.

BeastOfCaerbannog's user avatar

answered Sep 6, 2022 at 20:38

Arunjith R S's user avatar

2

Before you get into this article, you may find here are the most frequent solved problems here it is.

This article covers a detailed step by step solution and there are significant reasons this content serves your purpose. Success 

I’m happy to share the piece of tip here that worked for me and saved my time a lot. 

Let’s begin now,  

Introduction

Before begin, a bit to describe my development work here is the project developed in PHP Laravel Framework with LAMP (Linux Apache, MySQL and Php). The completed Php project is deployed in AWS Server instance in where Linux Ubuntu 18.4 OS installed.

Over a period of time, php project captures error logs increased size and occupied disk space in server instance. 

  • Software Involved
  • Linux — Ubuntu 18.4
  • Linux Command Terminal
  • PHP — Laravel Framework
  • MySQL

As you may have encountered these terms like error writing lock file no space left on device, swp: Not enough data read, .swp file. There could be lot of reasons why we encounter «Not enough space left«. 

Similarly here are the most frequent search terms as you and me searched a lot to get here.

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

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

Error reading lock file /etc/.rc.local.swp Not enough data read

As said above .swp file may be the one causing the error. In your case .swp could be profile or default or local.

Problem Description

This is what happened in my case,

I logged into server instance where my php project is deployed which is Ubuntu 18.4, and opened command Terminal (Ctrl + Alt + T).  I navigated to project folder.

When exactly this error thrown?

There was a random common error in php project, if you are php background I’m sure you know it .env file and its purposes.

.env file stores all the configurations databases, SSL certificates credentials etc of the project.

 As said in above box, I actually did not configure correctly, setting to APP_DEBUG=true in .env file is fine for development.

APP_DEBUG = true

Whereas when you deploy your project in server it is highly not recommended to set as true. It should be set to false as below

APP_DEBUG = false

Why setting to false is important?

Its because when you set APP_Debug = true in .env file means when you encounter error in application the exception thrown in browser along with whole .env file expose everything as plain text.

Imagine anyone sees the error can also read your database user name and password.

Apart from above suggested let’s get into the main problem description,

In the project folder .env file resides in root folder, now I try to open it (to change APP_DEBUG=false) in command line editor in terminal with this command $ sudo nano .env

$ sudo nano .env

After executing the command error show as «Error reading lock file ./..env.swp not enough data read«. This is because any file you open with any editor .swp file gets created. And in here, log file size huge and space on device is insufficient to open the file in editor. 

If you have searched google many sites suggested different approach that did not help as much, that’s the only reason I’m providing helping hand, explore more here

Get Set Solution helps everyone with details steps with google search.

Solve Error reading lock file

So how I get rid of not enough data read on device? Let’s move to solution section.

Solution

The simple solution is provided in image below. 

These are the 4 steps to do 

  • 1. Navigate to your Project folder
  • 2. Find if you have hidden .swp files in folder
  • 3. Delete the .swp files
  • 4. Ensure you have deleted or not

STEP 1 : Navigate to your Project Folder 

I have placed my project folder in /home/ubuntu/projects/generator.

/home is home directory

/ubuntu is user account 

/projects is the folder name 

/generator is the actual php application 

STEP : 2  Find if you have hidden .swp files 

As circled 1 in image, execute this command find . -name «*.swp»

$ find . -name «*.swp»

the result will be as below as circled 2 list of .swp files available in my project

.swp files

STEP 3 : Delete the .swp files

As circled 3 in image, execute the command find . -name «*.swp» -delete 

$ find . -name «*.swp» -delete

After executing command, you find all the .swp files are deleted 

STEP 4:  Ensure you have deleted .swp files are not 

Just execute the same command find . -name «*.swp» this takes to next line that indicates you have deleted .swp files successfully

If you have missed all 4 steps, you can refer to below image described.

 

Solved Error reading lock file not enough space on disk

So what’s next move?

Now you can proceed to open .env file using this command, that’s all done.

$ sudo nano .env

I tried running sudo nano /etc/fstab/ but such a file did not exist. So nano displays the following error:

[ Error reading lock file /etc/.fstab.swp: Not enough data read ]

Some other background info about my setup, I had a swap parition defined during the OS installation but due to space constaints on my main partition I deleted it, and consumed the space.

Afterwards I added a second drive to my system and I’m trying to use one of its partitions as the swap. This is possible with GParted using the swapon command but it needs to be done after every reboot.

Is there a way to permanently set the new partition as my swap?

waldyrious's user avatar

asked Dec 12, 2016 at 14:17

john's user avatar

As lemonslice said, you need to edit /etc/fstab and not /etc/fstab/.
You can use GParted to find your UUID (right click > informations).


Then just add a ligne to fstab like this UUID=YOUR_UUID none swap sw 0 0. I made you a screenshot to show you my configuration :

http://nsa38.casimages.com/img/2016/12/12/161212052324528993.png

lemonslice's user avatar

lemonslice

4,5024 gold badges17 silver badges37 bronze badges

answered Dec 12, 2016 at 16:08

Shining's user avatar

ShiningShining

3062 silver badges10 bronze badges

2

You can check the UUID of your (new) swap space:

user@host:~$ lsblk -f -o NAME,FSTYPE,UUID | grep swap
├─sda3 swap   ce70123c-6341-4802-9b96-29c39fb4110b

You should edit sudo nano /etc/fstab (without the trailing slash) and add the line (make sure you use your UUID):

UUID=ce70123c-6341-4802-9b96-29c39fb4110b none            swap    sw              0       0

answered Dec 12, 2016 at 15:48

lemonslice's user avatar

lemonslicelemonslice

4,5024 gold badges17 silver badges37 bronze badges

5

Run the following command to get the UUID of your swap partition:

ls -l /dev/disk/by-uuid

Edit your /etc/fstab and change the uuid

# swap was on /dev/sdax during installation
UUID=put_the uuid_here none            swap    sw              0       0

Assign the new uuid ( change sdax with yours)

swapoff /dev/sdax
mkswap -U put_the_uuid_here /dev/sdax
swapon -a

answered Dec 22, 2016 at 22:32

GAD3R's user avatar

GAD3RGAD3R

2321 silver badge3 bronze badges

I tried running sudo nano /etc/fstab/ but such a file did not exist. So nano displays the following error:

[ Error reading lock file /etc/.fstab.swp: Not enough data read ]

Some other background info about my setup, I had a swap parition defined during the OS installation but due to space constaints on my main partition I deleted it, and consumed the space.

Afterwards I added a second drive to my system and I’m trying to use one of its partitions as the swap. This is possible with GParted using the swapon command but it needs to be done after every reboot.

Is there a way to permanently set the new partition as my swap?

waldyrious's user avatar

asked Dec 12, 2016 at 14:17

john's user avatar

As lemonslice said, you need to edit /etc/fstab and not /etc/fstab/.
You can use GParted to find your UUID (right click > informations).


Then just add a ligne to fstab like this UUID=YOUR_UUID none swap sw 0 0. I made you a screenshot to show you my configuration :

http://nsa38.casimages.com/img/2016/12/12/161212052324528993.png

lemonslice's user avatar

lemonslice

4,5024 gold badges17 silver badges37 bronze badges

answered Dec 12, 2016 at 16:08

Shining's user avatar

ShiningShining

3062 silver badges10 bronze badges

2

You can check the UUID of your (new) swap space:

user@host:~$ lsblk -f -o NAME,FSTYPE,UUID | grep swap
├─sda3 swap   ce70123c-6341-4802-9b96-29c39fb4110b

You should edit sudo nano /etc/fstab (without the trailing slash) and add the line (make sure you use your UUID):

UUID=ce70123c-6341-4802-9b96-29c39fb4110b none            swap    sw              0       0

answered Dec 12, 2016 at 15:48

lemonslice's user avatar

lemonslicelemonslice

4,5024 gold badges17 silver badges37 bronze badges

5

Run the following command to get the UUID of your swap partition:

ls -l /dev/disk/by-uuid

Edit your /etc/fstab and change the uuid

# swap was on /dev/sdax during installation
UUID=put_the uuid_here none            swap    sw              0       0

Assign the new uuid ( change sdax with yours)

swapoff /dev/sdax
mkswap -U put_the_uuid_here /dev/sdax
swapon -a

answered Dec 22, 2016 at 22:32

GAD3R's user avatar

GAD3RGAD3R

2321 silver badge3 bronze badges

Я получаю эту ошибку при открытии /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 was able to access rc.local just a little bit ago and now it wont let me. I cant even delete the swp file due to permission issues. Im not sure where to go from here, the error i get when opening the rc.local file is

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

When i try to delete the swp file i get

rm /etc/.rc.local.swp

rm: remove write-protected regular empty file ‘/etc/.rc.local.swp’? y

rm: cannot remove ‘/etc/.rc.local.swp’: Permission denied

asked Apr 8, 2019 at 22:36

Reese Houseknecht's user avatar

1

.*.swp files are created by the vi editor to log changes so that the undo command can work.

They are created with the same permissions as the file they are logging in the same directory. Because the name starts with a period they are hidden.

If you’ve used sudo vi /etc/rc.local and created /etc/.rc.local.swp you’ll need to use sudo rm /etc/.rc.local.swp to remove it.

answered Apr 9, 2019 at 1:03

Dougie's user avatar

  • Home
  • Forum
  • The Ubuntu Forum Community
  • Ubuntu Official Flavours Support
  • Networking & Wireless
  • [SOLVED] ./. interfaces.swp: Not enough data read

  1. ./. interfaces.swp: Not enough data read

    In trying to modify my /etc/network/interfaces file on my home web server, I fat-fingered something, apparently.

    Now, trying to modify the file in nano, I get a blank buffer with the message:

    Code:

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

    I can’t connect to my network.

    I have tried: Rebooting, removing /etc/network/interfaces, recreating it. I’m still getting the message.

    (This is not the buffer underflow bug with nano 2.4.2, since I’m using 2.5)

    Edit: Sigh … Created a dummy file with garbage in it and called it interfaces.swp. Am now able to edit interfaces.

    Last edited by QIII; September 19th, 2017 at 04:40 AM.

    Please read The Forum Rules and The Forum Posting Guidelines

    A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
    This universe is crazy. I’m going back to my own.


  2. Re: ./. interfaces.swp: Not enough data read

    delete all the .swp file in the /etc/network/
    hope this help


Bookmarks

Bookmarks


Posting Permissions

  • #3

@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:

Code:

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.

Thanks for your feedback!

Last edited: Sep 30, 2021

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

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

Как мне это исправить ??

задан 30 мая 2019 в 10:53

timob256's user avatar

timob256timob256

2,8915 золотых знаков40 серебряных знаков80 бронзовых знаков

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

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

# rm /My_file/.main.cpp.swp

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

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

timob256's user avatar

timob256timob256

2,8915 золотых знаков40 серебряных знаков80 бронзовых знаков

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's user avatar

Zanna

69k56 gold badges215 silver badges327 bronze badges

asked Jul 25, 2017 at 9:12

Vaibhav Phadke's user avatar

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's user avatar

storm

4,9336 gold badges34 silver badges48 bronze badges

answered Sep 21, 2017 at 8:50

sunwalker's user avatar

sunwalkersunwalker

5613 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

The Pizza Overlord's user avatar

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

Anthony's user avatar

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

AyuMu's user avatar

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.

BeastOfCaerbannog - On strike's user avatar

answered Sep 6, 2022 at 20:38

Arunjith R S's user avatar

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

Sunil Dhayal's user avatar

Before you get into this article, you may find here are the most frequent solved problems here it is.

This article covers a detailed step by step solution and there are significant reasons this content serves your purpose. Success 

I’m happy to share the piece of tip here that worked for me and saved my time a lot. 

Let’s begin now,  

Introduction

Before begin, a bit to describe my development work here is the project developed in PHP Laravel Framework with LAMP (Linux Apache, MySQL and Php). The completed Php project is deployed in AWS Server instance in where Linux Ubuntu 18.4 OS installed.

Over a period of time, php project captures error logs increased size and occupied disk space in server instance. 

  • Software Involved
  • Linux — Ubuntu 18.4
  • Linux Command Terminal
  • PHP — Laravel Framework
  • MySQL

As you may have encountered these terms like error writing lock file no space left on device, swp: Not enough data read, .swp file. There could be lot of reasons why we encounter «Not enough space left«. 

Similarly here are the most frequent search terms as you and me searched a lot to get here.

As said above .swp file may be the one causing the error. In your case .swp could be profile or default or local.

Problem Description

This is what happened in my case,

I logged into server instance where my php project is deployed which is Ubuntu 18.4, and opened command Terminal (Ctrl + Alt + T).  I navigated to project folder.

When exactly this error thrown?

There was a random common error in php project, if you are php background I’m sure you know it .env file and its purposes.

.env file stores all the configurations databases, SSL certificates credentials etc of the project.

 As said in above box, I actually did not configure correctly, setting to APP_DEBUG=true in .env file is fine for development.

APP_DEBUG = true

Whereas when you deploy your project in server it is highly not recommended to set as true. It should be set to false as below

APP_DEBUG = false

Why setting to false is important?

Its because when you set APP_Debug = true in .env file means when you encounter error in application the exception thrown in browser along with whole .env file expose everything as plain text.

Imagine anyone sees the error can also read your database user name and password.

Apart from above suggested let’s get into the main problem description,

In the project folder .env file resides in root folder, now I try to open it (to change APP_DEBUG=false) in command line editor in terminal with this command $ sudo nano .env

$ sudo nano .env

After executing the command error show as «Error reading lock file ./..env.swp not enough data read«. This is because any file you open with any editor .swp file gets created. And in here, log file size huge and space on device is insufficient to open the file in editor. 

If you have searched google many sites suggested different approach that did not help as much, that’s the only reason I’m providing helping hand, explore more here

Get Set Solution helps everyone with details steps with google search.

Solve Error reading lock file

So how I get rid of not enough data read on device? Let’s move to solution section.

Solution

The simple solution is provided in image below. 

These are the 4 steps to do 

  • 1. Navigate to your Project folder
  • 2. Find if you have hidden .swp files in folder
  • 3. Delete the .swp files
  • 4. Ensure you have deleted or not

STEP 1 : Navigate to your Project Folder 

I have placed my project folder in /home/ubuntu/projects/generator.

/home is home directory

/ubuntu is user account 

/projects is the folder name 

/generator is the actual php application 

STEP : 2  Find if you have hidden .swp files 

As circled 1 in image, execute this command find . -name «*.swp»

$ find . -name «*.swp»

the result will be as below as circled 2 list of .swp files available in my project

.swp files

STEP 3 : Delete the .swp files

As circled 3 in image, execute the command find . -name «*.swp» -delete 

$ find . -name «*.swp» -delete

After executing command, you find all the .swp files are deleted 

STEP 4:  Ensure you have deleted .swp files are not 

Just execute the same command find . -name «*.swp» this takes to next line that indicates you have deleted .swp files successfully

If you have missed all 4 steps, you can refer to below image described.

 

Solved Error reading lock file not enough space on disk

So what’s next move?

Now you can proceed to open .env file using this command, that’s all done.

$ sudo nano .env

Содержание

  1. Ошибка при открытии /etc/profile: Ошибка чтения файла блокировки /etc/.profile.swp: Недостаточно чтения данных
  2. 6 ответов
  3. Buffer underflow in nano 2.4.2-1ubuntu0.1 causes SIGSEGV
  4. Bug Description
  5. Nano error reading lock file
  6. Thread: Asus X205TA Kali
  7. Asus X205TA Kali
  8. Re: Asus X205TA Kali
  9. Re: Asus X205TA Kali
  10. Re: Asus X205TA Kali
  11. Re: Asus X205TA Kali
  12. Re: Asus X205TA Kali
  13. Re: Asus X205TA Kali

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

Я получаю эту ошибку при открытии /etc/profile файл с использованием нано.

Как я могу это исправить?

6 ответов

Попробуйте удалить скрытый файл .[yourfilename].swp , который хранится в той же папке, что и файл, который вы пытаетесь открыть.
В вашем случае попробуйте команду оболочки rm /etc/.profile.swp ,

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

Надеюсь, это помогло

Проблема связана с ошибкой в ​​старой версии nano как видно здесь.

Согласно отчету, уязвимая версия была nano-2.4.2 , Ты должен бежать nano —version чтобы узнать вашу текущую версию и обновить соответственно.

Более подробный отчет о фактической проблеме можно найти здесь.

Это происходило для меня, потому что у меня не было места на диске, я очистил немного места, удалил файл подкачки, и это сработало.

Это произошло для меня из-за файла журнала, который не вращался, он занял все дисковое пространство, я решил это, обрезав этот файл журнала, а затем удалив файл.swp.

Примерьте вот это

Для меня это было из-за запуска журналов контейнера докеров. Работал нормально после их удаления. Расположение журналов: /var/lib/docker/containers/ rm -rf /var/lib/docker/containers/*

Примечание: это приведет к удалению всего журнала, созданного до сегодняшнего дня, вы можете выбрать удаление без необходимости, а также сделать резервную копию, чтобы избежать потери данных журналов.

Источник

Buffer underflow in nano 2.4.2-1ubuntu0.1 causes SIGSEGV

Affects Status Importance Assigned to Milestone
nano (Ubuntu)

Bug Description

$ touch .the_test.swp
nusch@XPS13:

$ nano the_test
core dumped
LANG env is =»pl_PL.UTF» without it it doen’t Segfault so error is connected with unicode handling.

Compiling nano from source(apt-get source — so the same version) doesn’t geneate nano binary which beheaves same way.

The difference is in libncurses>w (0x00007ffe5cb0 0000)
libncursesw.so.5 => /lib/x86_ 64-linux- gnu/libncursesw .so.5 (0x00007fdec11c 5000) /lib/x86_ 64-linux- gnu/libtinfo. so.5 (0x00007fdec0f9 c000)
libc.so.6 => /lib/x86_ 64-linux- gnu/libc. so.6 (0x00007fdec0bd 1000)
libdl.so.2 => /lib/x86_ 64-linux- gnu/libdl. so.2 (0x00007fdec09c d000)
/lib64/ ld-linux- x86-64. so.2 (0x000055cc1e5d 6000)
nusch@XPS13:

$ ldd /bin/nano_from_src
linux-vdso.so.1 => (0x00007ffd22d4 8000)
libncurses.so.5 => /lib/x86_ 64-linux- gnu/libncurses. so.5 (0x00007f75dc89 1000) /lib/x86_ 64-linux- gnu/libtinfo. so.5 (0x00007f75dc66 8000)
libc.so.6 => /lib/x86_ 64-linux- gnu/libc. so.6 (0x00007f75dc29 d000)
libdl.so.2 => /lib/x86_ 64-linux- gnu/libdl. so.2 (0x00007f75dc09 9000)
/lib64/ ld-linux- x86-64. so.2 (0x000055f9b15c e000)

Backtrace of segfault:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000 404047 in ?? ()
(gdb) bt
#0 0x0000000000404047 in ?? ()
#1 0x00007ffff75d1a40 in __libc_start_main (main=0x403770, argc=2, argv=0x7fffffff e2a8, init= , fini= , rtld_fini= , stack_end= 0x7fffffffe298) at libc-start.c:289
#2 0x0000000000404329 in ?? ()

Disassembly of that part of code:
40401d: 0f 84 3c 01 00 00 je 40415f chk@plt+ 0x9ff>
404023: 83 7c 24 10 00 cmp DWORD PTR [rsp+0x10],0x0
404028: 75 0a jne 404034 chk@plt+ 0x8d4>
40402a: 81 25 1c e8 22 00 ff and DWORD PTR [rip+0x22e81c] ,0xffffbfff # 632850
404031: bf ff ff
404034: 48 8b 05 dd e7 22 00 mov rax,QWORD PTR [rip+0x22e7dd] # 632818
40403b: 48 8b 80 90 00 00 00 mov rax,QWORD PTR [rax+0x90]
404042: 48 85 c0 test rax,rax
404045: 74 0b je 404052 chk@plt+ 0x8f2>
404047: 83 78 38 00 cmp DWORD PTR [rax+0x38],0x0
40404b: 7e 05 jle 404052 chk@plt+ 0x8f2>
40404d: e8 3e fc 00 00 call 413c90 chk@plt+ 0x10530>
404052: 48 8b 7c 24 20 mov rdi,QWORD PTR [rsp+0x20]
404057: 48 85 ff test rdi,rdi
40405a: 0f 8e b5 00 00 00 jle 404115 chk@plt+ 0x9b5>
404060: 48 8b 74 24 28 mov rsi,QWORD PTR [rsp+0x28]

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: nano 2.4.2-1ubuntu0.1
ProcVersionSign ature: Ubuntu 4.2.0-25.30-generic 4.2.6
Uname: Linux 4.2.0-25-generic x86_64
NonfreeKernelMo dules: wl
ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
CurrentDesktop: Unity
Date: Fri Jan 29 15:13:25 2016
InstallationDate: Installed on 2015-05-08 (266 days ago)
InstallationMedia: Ubuntu 15.04 «Vivid Vervet» — Release amd64 (20150422)
SourcePackage: nano
UpgradeStatus: Upgraded to wily on 2015-11-15 (74 days ago)

Источник

Nano error reading lock file

I installed Kali on my asus X205TA and I have a problem regarding grub file editing.
I go to the etc/default folder and when I hit nano grub it doesn t display any line but instead : » Error reading lock lock file ./.grub.swp: Not enough data read «

Can u please help me Linux gurus ? 🙂

It worked with the GUI text editor 🙂
Thank you for your answer and your help !

Do you have any idea what might be the problem when I use the command prompt ?

Yes I can open the hosts file for example

When I installed Kali I updated and upgraded everything right after the installation.
I reinstalled the whole system and I had no problem to open the grub file with nano.

So it kinda sucks because I don t want to upgrade/update it if some problems like this appear.
Do u reckon it is related to the upgrade ?

Yes I can open the hosts file for example

When I installed Kali I updated and upgraded everything right after the installation.
I reinstalled the whole system and I had no problem to open the grub file with nano.

So it kinda sucks because I don t want to upgrade/update it if some problems like this appear.
Do u reckon it is related to the upgrade ?
Could be, as users do sometimes have difficulties related to that.
However, I have never updated from one version to another, if that is what you mean; I always do a clean installation, which with a separate /home partition, takes about 20-30 minutes, so have no experience of update problems.

Nor, I hasten to add, do I know kali at all.

Источник

Thread: Asus X205TA Kali

Thread Tools
Display

Asus X205TA Kali

I installed Kali on my asus X205TA and I have a problem regarding grub file editing.
I go to the etc/default folder and when I hit nano grub it doesn t display any line but instead : » Error reading lock lock file ./.grub.swp: Not enough data read «

Can u please help me Linux gurus ?

Re: Asus X205TA Kali

Thread moved to the «Ubuntu/Debian BASED» forum.

Re: Asus X205TA Kali

Can you read the file if you go to it in the file manager of kali and open it in the default GUI text editor?
Does you kali install have any GUI or is it command line only?

Re: Asus X205TA Kali

It worked with the GUI text editor
Thank you for your answer and your help !

Do you have any idea what might be the problem when I use the command prompt ?

Re: Asus X205TA Kali

None, I’m afraid.
Can you open any other text files using nano?

Re: Asus X205TA Kali

Yes I can open the hosts file for example

When I installed Kali I updated and upgraded everything right after the installation.
I reinstalled the whole system and I had no problem to open the grub file with nano.

So it kinda sucks because I don t want to upgrade/update it if some problems like this appear.
Do u reckon it is related to the upgrade ?

Last edited by xmaspaul; January 7th, 2017 at 10:29 PM .

Re: Asus X205TA Kali

Yes I can open the hosts file for example

When I installed Kali I updated and upgraded everything right after the installation.
I reinstalled the whole system and I had no problem to open the grub file with nano.

So it kinda sucks because I don t want to upgrade/update it if some problems like this appear.
Do u reckon it is related to the upgrade ?

Could be, as users do sometimes have difficulties related to that.
However, I have never updated from one version to another, if that is what you mean; I always do a clean installation, which with a separate /home partition, takes about 20-30 minutes, so have no experience of update problems.

Nor, I hasten to add, do I know kali at all.

Источник

  • Ошибка чтения файла wot blitz на андроид
  • Ошибка чтения файла wot blitz код ошибки 117
  • Ошибка чтения файла unsupported variant type 0 базис мебельщик
  • Ошибка чтения файла libreoffice
  • Ошибка чтения файла epic games убедитесь что файл существует