File Attributes

0 views - 1 minute readEdit this post

I rely on your support to keep this website running. If you find the content valuable, please consider making a small donation. whether it’s ₹25/$1 or ₹500/$5.


Secured by Stripe

File Operations -

  • File operations are used to manage files in operating system.
  • Here are some file operations.

Open File -

  • create - Creates new file.
  • open - Opens existing file or creates new file.

Read/Write Files -

  • read - Reads data from the file.
  • write - Write new given data in the file.

Close Files -

  • close - closes open files.

Delete Files -

  • remove - Delete files. File must not be open when deleting.

Modify Metadata -

  • truncate - truncates(clears) file to specified length.
  • chmod - Allows to change the permission of files like readable/writeable.

Status/Info -

  • stat - Get file attributes/metadata like permissions, size, timestamps, etc.

Did you enjoyed the post?

Twitter (x)