getting an error in Linux when try to create a file or save

Discussion in 'Technical' started by Harsh Shah, Oct 2, 2019.

  1. Harsh Shah

    Harsh Shah Banned

    I was trying to create file in Linux but getting error as shown below:
    $ cat > file
    -bash: file: Read-only file system

    Hope will get better solution.
    Thanks in advanced.
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    My guess: current directory when doing cat > file is not writable. The error messages says Read-only file system. What shows
    cat > file
    df -hT .
    If you just want to cat to somewhere, this should work:
    cat > /tmp/file.txt
    Press Control-D when finished writing to that file.

Share This Page