To open a file using kate
, you can run something like:
kate filename
This might show some messages like:
kate(3702)/kdecore (services) KMimeTypeFactory::parseMagic: Now parsing "/usr/share/mime/magic"
kate(3702)/kdecore (services) KMimeTypeFactory::parseMagic: Now parsing "/home/user/.local/share/mime/magic"
Bus::open: Can not get ibus-daemon's address.
IBusInputContext::createInputContext: no connection to ibus-daemon
To remove these messages, redirect the error output stream to /dev/null
:
kate filename 2>/dev/null
If you want to continue using the same terminal, add an &
after the command:
kate filename 2>/dev/null &
If you want to run edit filename
to open it, you could create a bash function in your ~/.bashrc
file. Add the next code to your ~/.bashrc
file:
edit() { kate "$@" 2>/dev/null & }
Just open your terminal with CTRL+ALT+Tand type as
> hello.txt
that's it, your data in that file will be cleared with out opening it even .
Example:
Best Answer
Another method is to use
split
. Split the file into 8 pieces and manipulate the files with a editor. After that, you reassemble the files again.