Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

Can someone help me fix this error?

 
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've been using the :wq command in vim all day and all of a sudden after I tested my program I get the error attached when I try to use :wq or any other command other than :q!
Could someone help me fix this? Im unsure what happened.
Screen-Shot-2021-02-13-at-6.59.01-PM.png
[Thumbnail for Screen-Shot-2021-02-13-at-6.59.01-PM.png]
 
Saloon Keeper
Posts: 23252
158
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"fsync" is the filesystem synchronization function. It basically means that the file could not be properly written.

Apparently a number of things can cause this, but these days, the prime suspects would be that the filesystem that you are trying to write to is full or there's a problem with a network file share (if you're saving a network file). I would also have said a hardware error at one time. Not so sure now.

Try writing the file to a more reliable location and then see if you can copy from there to the save location.
 
Hanna Roberts
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I ssh into a school server and work in there, im not sure if thats what you mean by network file? I tried making a file in a different spot to see if that would help but I had the same problem. Im new to using linux/unix so I dont really know much
 
Tim Holloway
Saloon Keeper
Posts: 23252
158
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this:

1. Hit Ctrl-Z. That should pause vi, print a "Stopped" message and give you a command prompt.
2. Type the command 'df -h ." Note the "." at the end. It's important, as is the space before and after the "-h".

That should give you a disk space report something like this:

If the filesystem is a local disk, it might be something like /dev/sda1 or /dev/mapper/VolGroup00-Home

If "use" is 100%, then the disk is full. if you can, delete some files. if not, you need someone to give you more disk space.

Finally, to resume vi, type the command "fg" at the command prompt.

If the disk was not full and you still cannot write, then contact the system administrator for the machine you are logged into and report the problem. It's probably something you can't fix. But hopefully, they can!
 
Hanna Roberts
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the help, I had logged in a few hours later and everything was fine again, so maybe it was a problem on the administrators end
 
lowercase baba
Posts: 12962
66
Chrome Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hanna Roberts wrote:So I ssh into a school server and work in there, im not sure if thats what you mean by network file?


These days it is not uncommon to have many computers (unix boxes, pcs, macs, etc) all connect to another box that is basically a HUGE set of disk drives. The box is built to be super-efficient at it, since it really only has to serve files.  It also makes it easier to add more disk space, manage the software for it, etc., as everything is in one spot, rather than spread out over 50 individual pc's, linux boxes, macs, etc.

So a network file basically means a file that is saved onto a hard disk that you connect to via the network/internet, instead of on your local machine.  If you ssh from your pc to a unix server, that unix box may then have a network attached storage device for saving files.  (It would also most likely have a local, smaller disk).
 
Tim Holloway
Saloon Keeper
Posts: 23252
158
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, I suppose I should clarify, even though the problem is resolved.

What Fred refers to is the difference between files located in your own computer box and those located in some other computer box (often these days, that can include a box with nothing but disk drives in it!)

You access those "other box" files using network filesystem drivers via a process called "network sharing". In Windows, they usually just call it a Windows File Share. In Unix/Linux, it may be NFS, CIFS/Samba (the universal version of the Windows share), or specialized distributed filesystems like glusterfs.

But SSH logins aren't the same thing. When you log into another computer using SSH, that computer becomes, in effect, "your own computer", so what constitutes "other box" files changes. If my computer is named "Ron" and the SSH machine I'm logging into is named "Fred" and there's a network file server machine named "George", then it's likely that my remote session on Fred can read and write files on George. On the other hand, if Ron is a remote dialup machine not on the same LAN as Fred and George, then Ron may not be able to access the George files directly. By using SSH, you effectively leave your seat on the Ron machine and sit in front of the Fred machine.

SSH is not filesharing, though, so as a user of the Fred machine, you won't be able to access files on the Ron machine.

Hope that didn't just make things more confusing!
 
Create symphonies in seed and soil. For this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic