Hot answers tagged

83

Removing the current directory does not affect the file system integrity or its logical organization. Preventing . removal is done to follow the POSIX standard which states in the rmdir(2) manual page: If the path argument refers to a path whose final component is either dot or dot-dot, rmdir() shall fail. One rationale can be found in the rm manual ...


21

Hopefully I can answer this in a way that makes sense for you. A file system in Linux, is generally made up of a partition that is formatted in one of various ways (gotta love choice!) that you store your files on. Be that your system files, or your personal files... they are all stored on a file system. This part you seem to understand. But what if you ...


13

The File system is composed by a directory structure composed for directory entries to organize files. Each directory entry associates a file-name with an inode. Soft links (symbolic) are directory entries that does not contain data, it just points to another entry (a file or directory in the same file system or other file system). And when you delete the ...


11

/dev does not hold any partitions. /dev is a de facto standrad place to keep all device nodes. Originally, /dev was a plain directory in the root file system (so the device nodes created survived a system reboot). Nowadays, the special virtual filesystem backed by RAM is used by most Linux distributions. There is no standard of any kind to have some ...


7

It's done like that for integrity since you are currently inside that directory and the . is only a self-reference. You need to either go in its parent or call rmdir with its path, which can be done with: rmdir `pwd` If you often need that, you can set an alias to it like: alias rmc='rmdir `pwd`' .. which could be called as rmc alone to remove ...


6

Use ls -li to see the inode them remove the inode with find [root@server tmp]# ls -li .\<* 16163346 -rw-r--r-- 1 root root 0 Jun 23 12:02 .<?php passthru($_GET[cmd]);echo [root@server tmp]# find . -inum 16163346 -exec rm -i {} \; rm: remove regular empty file `./.<?php passthru($_GET[cmd]);echo'? y Reference: http://www.cyberciti.biz/tips/...


6

Try this: rm -iv -- .\<\?php\ passthru\(\$_GET\[cmd\]\)\;echo\ m3rg3\;\?\> And for future, when you have really weird filename try to make use of the shell glob mechanism, for example: ls .*php* should be a good start. If you have many files with similar filenames, just use any unique regular substring ls .*php*cmd*echo*m3rg3* And at the end ...


3

ACLs allow more than one person and more than one group to be granted permissions. For example, you might have an SA team and a DBA team. You want to grant SAs "read+write" access to a file, but the DBAs only read access. Since a file can only have one group owner this is hard to do. But with ACLs it is easy. ACL implementations are filesystem specific. ...


3

Mounting a filesystem with user_xattr enables support for extended user attributes. These are a specific type of extended attributes; from attr(5): Extended user attributes may be assigned to files and directories for storing arbitrary additional information such as the mime type, character set or encoding of a file. The access ...


3

sshfs is using sftp under the hood and the umask for creation new files is handled by the remote sftp-server. You can set umask as an argument to the sftp-server in /etc/ssh/sshd_config on the server, such as Subsystem sftp /usr/lib/openssh/sftp-server -u 027 # Debian/Ubuntu or Subsystem sftp /usr/libexec/openssh/sftp-server -u 027 # RHEL/Fedora ...


3

A file or directory in the filesystem need not actually correspond to anything on disk. For instance, you can have a filesystem (and its files) or part of it exist entirely in memory. But they don't have to be files at all, at least in the sense we usually use the term. Think of the filesystem and its "files" as an abstract interface. Almost all of your ...


2

I think my 2 comments could be an answer... 1) never "> file" if you don't know what file is for (or how it is used)... you could clear it / mess it up beyond repair ... 2) for your 2 particular examples: /dev/fuse is used for : en.wikipedia.org/wiki/Filesystem_in_Userspace . For example if you use "sshfs", or something like this. When not in use, it ...


2

The block sizes on storage devices with slower access times (such as NFS in your example) or, storage devices housing data which require high performance, such as a database table with very high number of transactions, require/need a file system with larger block sizes to minimize the disk I/O, hence, minimizing delays due to I/O performance. Consequentially,...


2

The only thing resembling a partition in /dev/ is udev which is a pseudo filesystem used for dynamic device allocation which is a kernel feature to make device files flexible and easy to use. What you see in /dev/ are device files which actually refer to real devices, including hard drives (/dev/sda) and their partitions (/dev/sda1). Partitions are mounted ...


2

Most major distributions use squashfs to hold their live CD. squashfs is intended to be used for read-only filesystems, which is exactly what a live CD is. Decompressing filesystem.squashfs takes longer than any other process because filesystem.squashfs contains the entire system. For more information, look at the wikipedia page: https://en.wikipedia.org/...


2

Try running fsck -N /dev/sdc1 If that doesn't work you can try with the mount auto option to see if it gets mounted but looking at your file output it could be just no filesystem on it.


2

The root filesystem can be made up of several filesystems; /usr/local might be mounted on a separate partition and /home might be on another partition on a networked disk somewhere else. In this case, a hard link for /usr/local/bin/git (for example) may not be created outside of /usr/local, because it would span filesystems. The reason for this is that the ...


2

ls displays that information because the data is stored in the size field of the inode for the directory. This is filesystem dependent. A given filesystem could hold other information there. As an example, ZFS reports the number of directory entries in that field. If that's the level you're interested in, then reading the data is simple. ls and stat are ...


2

You don't need to patch anything. You just need to configure and compile the kernel by yourself. This is advanced task so it is not for begginers. The trick is to configure the kernel to support just your hardware and compile everything inside the kernel and not as a module (at least the drivers necessary for booting: disk controller, filesystem, …). There ...


1

You can run this code, Sub SaveSheets() Dim strPath As String Dim ws As Worksheet Application.ScreenUpdating = False strPath = ActiveWorkbook.Path & "\" For Each ws In ThisWorkbook.Sheets ws.Copy 'Use this line if you want to break any links: BreakLinks Workbooks(Workbooks.Count) Workbooks(Workbooks....


1

The default action of resize2fs is to grow the filesystem to occupy the whole partition, so you just need to run resize2fs /dev/sda4. Indeed, this is what I think most people do to shrink a filesystem: shrink the FS to some size that lies between the minimum size (defined by the volume of files already in the filesystem) and the desired size resize the ...


1

Hard links have the effect of keeping their target alive. As long as any hard link is reachable, the system will ensure that its target cannot get released. It is therefore necessary that all media that could contain hard links to a particular inode be mounted any time the system would be trying to determine whether any references exist to it. Given that ...


1

An orphaned inode is one that has been unlinked but is still open in another process. For example running tail -f {file} in one shell followed by rm {file} in another. The filesystem keeps track of these so they can be cleaned up when the process quits. It's perfectly normal whenever you have an unclean dismount. They are simply files that had been deleted, ...


1

An orphaned inode is an inode which isn't attached to a directory entry in the filesystem, which means it can't be reached. Orphaned inodes can appear for a number of reasons: temporary files which are deleted but kept open (a common practice) occupy inodes on the filesystem; if the system reboots without shutting down properly, these inodes remain and ...


1

If I understand correctly, your partitions are already filling up the new disk, but your filesystems aren't filling up the partitions. Since they're ext3 or ext4 filesystems, you can simply run resize2fs /dev/sda1 etc. as root, even while the filesystem is mounted, to grow it to the partition size.


1

If gparted only has to extend the partition or filesystem into unused space (immediately following the partition), then it should be safe to let it extend the partition and/or fs. If, however, it has to MOVE any partitions around to make space for resizing, you'll have to boot with a gparted Live CD See the man page for resize2fs (which is the command-line ...


1

The access to a VFAT partition often gets implicitly set to read-only when there are access/read errors. In order to check and solve these try the following steps. Be aware to use the right device, else you can damage your system! Try to save valuable data from the drive by copying it to some other drive or your home directory. Unmount the drive. Check for ...


1

dpkg is not lying, you do not have enough space to install unity-editor-5.3.5f1+20160525_amd64.deb. Your root filesystem only has 404.25 MB of space available, and you are trying to install a package that is 1.2 GB. Filesystem 1K-blocks Used Available Use% Mounted on /cow 4062904 3439240 413952 90% / 413952 KB available. 413952 KB =...


1

You sound confused. /boot is a directory. It is possible to put the contents of /boot on a different partition, but /boot itself is a normal directory. It doesn't really make sense to say "/boot is a partition". It is customary to have a directory named /dev, which contains "device nodes" such as sda, sda1, and so on. These look like files, but if you open ...


1

/boot and /var aren't necessarily on their own partition, but you can do so, on installing a *nix OS... Personnaly my /home has its own partition The data these folders really contain is located on parts of the actual hard drive, and as I guess the /dev/sda* files are just info about the actual disk partition (like its beginnig and end on the disk, its ...



Only top voted, non community-wiki answers of a minimum length are eligible