A filesystem is a way to organize and store computer files with their data.
0
votes
1answer
23 views
can we specify number of inode & data block?
I learned that number of inode and datablock is assigned when created,
but for example, if we want "text.txt" this file to be stored in inode number 20 or datablock number 20, can we do it?
1
vote
1answer
18 views
How do I Encrypt a Flash Drive Using SecurStick?
I am trying to use SecurStick to encrypt a flash drive. I found these instructions online. However, when I unzip the archive and place the files on my flash drive, I cannot run the SecurStick program ...
4
votes
3answers
220 views
Do tmpfs and devtmpfs share the same memory region?
My system disk usage is like this:
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rhel-root 50G 39G 12G 77% /
devtmpfs 5.8G 0 5.8G 0% /dev
...
21
votes
7answers
2k views
Why does Linux need to have both `/dev/cdrom` and `/media/cdrom`? [duplicate]
Inspired by this question. Why does Linux need both /dev/cdrom and /media/cdrom?
Why not just access files on the cdrom through /dev/cdrom?
3
votes
1answer
17 views
How do I expand a file system to fill a partition?
As shown in the picture below, I've created partitions on two 32GB devices: an SD-card, and a flash usb stick.
I intended to create file systems using the entire partition in each case, yet somehow ...
1
vote
3answers
50 views
How could Linux use 'sda' device file when it hasn't been installed?
I am installing CentOS Linux distribution on a fresh new machine. Just for learning. I am new to Linux.
At the partition step, CentOS tells me that it has detected a sda HD in my machine and I should ...
0
votes
1answer
23 views
FileSystem monitoring using a config file
I am trying to monitor filesystem space using a shell script. That script should refer a config file that has alert status constraint. The config file is as below
FileSYSTEM WARNING CRITICAL
...
0
votes
0answers
11 views
How do I increase a partition size of a virtual disk?
I created a file using dd if=/dev/zero of=virt_disk bs=1024M count=50. I then formatted this is a vfat file system.
Now I want to extend this. I added 5 more MiB of space as dd if=/dev/zero bs=1024M ...
0
votes
2answers
42 views
fsck doesn't write changes
I'm trying to repair a SD card with FAT, but fsck doesn't write changes — even the magic -w option doesn't help
$ sudo fsck.fat -aw /dev/sda1
fsck.fat 3.0.26 (2014-03-07)
0x41: Dirty bit is set. Fs ...
0
votes
0answers
25 views
linux + resize2fs with Operation not permitted error
I am trying to increase the /opt to 65g
but I get the following message
Operation not permitted While trying to add group #8256
what is the resolution for that?
root@linux:/opt # lvresize -L 65g ...
0
votes
1answer
20 views
How to mark a partition as unmountable?
I partitioned a MMC card into multiple partitions (in GPT format), and the very first partition is just padding space so that all other partitions are aligned to a optimal boundary.
Problem is, on ...
1
vote
0answers
10 views
Example of situation where ACL unaware tools would grant unintended permssions
This document about File ACLs makes mention that the masking mechanism was put in place to solve the problem of
... POSIX.1 applications that are unaware of ACLs will not suddenly and ...
2
votes
1answer
25 views
How to make sure files are present when usb mounts?
When my computer mounts a USB, the files don't show up immediately, which is throwing off my script (which is quite quick). How do I make sure that the folder doesn't appear in my mounting directory ...
-1
votes
1answer
37 views
Accidentally moved file to `,` (comma)
I logged in as a root user and when moving a file, instead of:
mv myfile .
I entered
mv myfile ,
And now my file is gone but I am not sure where to. Where has it moved to?
10
votes
2answers
148 views
Are there any filesystems for which `ln -d` succeeds?
From the manpage for ln:
-d, -F, --directory
allow the superuser to attempt to hard link directories (note: will
probably fail due to system restrictions, even for the superuser)
Are there any ...
0
votes
4answers
62 views
How to merge one directory into other?
May somebody tell me if there is there some way to "merge" one dir into another?
I.e. let I have /some/directories/structure with subdirs/files. And now I want to "implantate" it into /etc for ...
0
votes
1answer
28 views
Share apps across multiple Linux distributions?
I have a triple boot of Ubuntu, Haze OS, and Kali Linux, and I would like to run an app installed on another operating system from my Primary OS. Like running chrome installed in Ubuntu while using ...
1
vote
0answers
7 views
VFAT FS Sync/Flush Behaviour
In order to increase the life of my VFAT flash drives, I have them set to mount as async. One of these drives sometimes deals with large data changes, and as a result, the writes that occur on umount ...
-1
votes
4answers
120 views
Why does linux use file extension to decide the default program for opening a file though it's independent of file extensions
I have a text file as- abc.text and it has its contents as Hi I'm a text file.
If I double click to open this file, then the files is opened in gedit editor.
Whereas, if I rename the file to ...
1
vote
0answers
16 views
Btrfs - Using Flash Drive as Backup/Snapshot Location
I am working on a project where I have a small MiniITX PC running Debian Jessie (8.3)
When I installed the OS initially:
I chose the filesystem as btrfs.
I am not using LVM or any extra partitions ...
0
votes
1answer
27 views
How do I know which File Systems my linux supports? [duplicate]
I am working with linux 3.19.0+ and I want to know if my linux kernel supports f2fs (Flash-Friendly File System). How do I know that?
-1
votes
1answer
20 views
After running “mkinitcpio -p linux” i got “Hook 'lvm' cannot be found”
Trying to install Arch with LVM basing on this guide: http://sharpeend.impcode.com/2014/04/installing-arch-linux-with-lvm.html
Partitions:
sda
-system-boot
-systrm-root
-system-home
5
votes
3answers
231 views
Watch /tmp for file creation and prevent deletion of files? [duplicate]
I have a binary that creates some files in /tmp/*some folder* and runs them. This same binary deletes these files right after running them. Is there any way to intercept these files?
I can't make the ...
0
votes
1answer
21 views
Expanding a hard drive partition to fill the drive without wiping the partition?
I have a hard drive that came out of an old Windows PC, which I'm using as a second hard drive. Because it was already formatted as ntfs, I didn't want to reformat it and lose all the data on it, so I ...
47
votes
8answers
6k views
On Unix systems, why do we have to explicitly `open()` and `close()` files to be able to `read()` or `write()` them?
Why do open() and close() exist in the Unix filesystem design?
Couldn't the OS just detect the first time read() or write() was called and do whatever open() would normally do?
0
votes
1answer
65 views
Load firmware on ro live cd
Basically I have the situation when box is booting from usb (gentoo-minimal.iso) but installation is lacking the firmware for killer 1525 (ath10k). The filesystem is mounted as ro and I can't put ...
-1
votes
0answers
32 views
changes in file aren't reflected in file system
I have been observing for 3-4 days that any change to file aren't being updated in file system although the program making the change says the file is updated.
For example, I am writing C program ...
3
votes
1answer
23 views
“Junctioned” symbolic links
Does Linux have the capability to use "junctioned" symbolic links? I'm not sure if this is an actual term or not, so let me explain the concept.
I have a git repository containing all my ...
3
votes
0answers
37 views
write(2)/read(2) atomicity between processes in linux [migrated]
I have a case where there are two processes which act on the same file - one as a writer and one as a reader. The file is a one line text file and the writer re-writes the line in a loop. reader reads ...
0
votes
3answers
42 views
Why would the size of /proc/stat show as zero? [duplicate]
ls -rlth /proc/stat
-r--r--r-- 1 root root 0 Feb 21 04:25 /proc/stat
Although if we cat it, its got enough contents. Any help regarding this virtual FS will be helpful.
3
votes
2answers
37 views
octal dump of directory
I got a copy of The Unix Programming Environment by Kernighan and Pike from a garage sale. I'm very interested in the chapter about the UNIX filesystem. Naturally, I also found this passage very ...
0
votes
0answers
10 views
How does vfs_write decide to aio_write of which file system?
We know that sys_write call vfs_write that ultimately call fs->f_ops->aio_write.But how does kernel know which filesystem's aio_write call back function to call??
Moreover I have noticed that ...
0
votes
1answer
46 views
Can we merge binary files without any copy operation by handling filesystem?
I would like to merge efficiently binary files using a shell command and I quickly found classical ways like this one :
cat file1 file2 > file3
Not bad but :
It's slow. IO access are slow.
It ...
-2
votes
1answer
29 views
How to get files from broken directory? [closed]
I created some files and directories on external NTFS HDD using Ubuntu. Some folders displayed with cross sign, I changes permissions for them (777), now they just as a files. Copying of directory ...
0
votes
0answers
30 views
What's different between logical block and physical block?
I know the logical block is viewed by kernel, and physical block is viewed by disk controller.
Then, Where the file system like ext3's block is related? Is this logical or physical?
I think file ...
3
votes
1answer
36 views
How is a symlink represented in a file system vs a hard link?
I want to make sure my understanding of this is correct:
Making a Hard link is created another dentry that points to the same inode
Making a symlink is creating a completely new file object/inode ...
1
vote
1answer
38 views
How to mount a drive from command line
I normally mount my drives just by opening it from filesystem. It automatically mount when I click on a drive. But I wanted to mount a drive from command line. I did ran this command
sudo mount -o ...
0
votes
1answer
16 views
Can't access to trash?
Whenever I try to enter into Trash Bin in Nautilus when a file is in it, an error message will display: Sorry, could not display all the contents of trash:///: Operation not supported. Neither sudo or ...
2
votes
2answers
74 views
Module vfat fails to load (I've tried the obvious fixes)
The module vfat doesn't load on boot, and attempts to force the issue with a modprobe vfat produce the error
modprobe: ERROR: could not insert 'vfat': Unknown symbol in module, or unknown parameter ...
0
votes
2answers
253 views
Does a user have permissions to write outside /home/userDir?
Does a normal* user have permissions to write anywhere else than his own home dir? (no sudo and those privilege escalation tools)
I say normal because I do not know more categories than root and ...
0
votes
1answer
40 views
Solaris: Spooling filesystem is full
I have a Solaris 5.8 machine that will no longer print. print job that come from the terminal say: "See if spooling file system is full"
I had a look around /var/spool but it isn’t particularly ...
1
vote
1answer
64 views
Linux file system corruption due to improper shutdown (fs ext4)?
I have been managing many Linux servers, It is very easy to play with Linux servers than any other OS. But Sometime I encounter a problem with Linux OS is that, The file system corruption. This ...
0
votes
1answer
44 views
Why is curl failing write to body?
I am trying to install pathogen.vim plugin with following command:
mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
But it is ...
1
vote
0answers
82 views
Cannot remove file: Read-only file system
I am trying to delete a file on an Ubuntu 12.04 system for which I have root access. However, I am getting this error:
root@CRST-Web:/home/real_property/html# rm -r -f results.php
rm: cannot remove ...
0
votes
0answers
29 views
How to set usb stick's ntfs filesystem's attribute to readonly in linux
I know how to set readonly attribute to ntfs filesystem of a usb device by using diskpart tool in windows.
attributes disk set readonly
but how to set readonly attribute to the same usb device ...
1
vote
1answer
97 views
Use “tune2fs” on XFS filesystem, get “Couldn't find valid filesystem superblock.”
I ran into this message two days ago=:
tune2fs: Bad magic number in super-block while trying to open /dev/vdc1
Couldn't find valid filesystem superblock.
The system is Ubuntu, a KVM virtual machine ...
3
votes
3answers
37 views
“write-once archive”: ext2 vs ext4^has_journal vs
summary
Suppose one is setting up an external drive to be a "write-once archive": one intends to reformat it, copy some files that will (hopefully) never be updated, then set it aside until I need to ...
2
votes
1answer
29 views
Why the ext4 filesystem can be shrunk only when not mounted?
I'm playing a little bit with LVM. I've noticed that I can add a new HDD, include it in the volume group, and add some space to all of the existing volumes without unmounting theirs filesystem or ...
1
vote
1answer
49 views
Why deleting big files from tmpfs is not instantaneous?
$ cat /proc/mounts | egrep ' /tmp '
tmpfs /tmp tmpfs rw,nosuid,nodev,relatime 0 0
$ dd if=/dev/zero bs=1M count=3000 of=/tmp/q
3000+0 records in
3000+0 records out
3145728000 bytes (3.1 GB) copied, ...
1
vote
1answer
30 views
Symlink to same directory
I've set up a ftp server for using ftp push on a tv recording page. I've created an extra user for this, who has only access to one directory, which the user is chroot-ed in. But the page does not ...