Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to append a file in sdb shell

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains the "how to write files in sdb shell", the content of the explanation is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to write files in sdb shell" bar!

[problem description]

Is it possible to append existing files in sdb shell?

[solution]

1. You can use seek to offset an existing file to a certain location, and use write to start writing from the offset, such as:

Var file = new File ("/ opt/text.txt") / / Open the file

File.seek (0 file pointer') / / indicates that the current pointer is to the end of the file

File.write ("test") / / indicates that "test" is written from the end of the file

File.close / / to save

2. Seek (offset,where), offset: the offset of the file pointer in bytes; where: specifies the location where the calculation begins. The values of where:'b','c', and 'eBay, respectively, represent Begin Current End.

3. In sdb shell, you can use the help method to view related usage, such as: new File ("/ opt/text.txt") .help ()

Thank you for your reading, these are the contents of "how to write additional documents in sdb shell". After the study of this article, I believe you have a deeper understanding of how to write additional documents in sdb shell, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report