New answers tagged

0

find GNU or not GNU With the GNU version of find you can write directly, without seeking for their inode, find . -name '.<*' -delete of course it's always suggested to try before without the -delete option and check the name of the files you are going to delete. With a non GNU version too it could be done directly find . -name '.<*' -exec rm -i {...


1

rm is a smart beast, you can use glob patterns in the argument For your case a simple rm .\<* is sufficient *be careful when using rm with glob patterns as it will delete multiple files matching the pattern


1

You didn't specify the OS of the server, nor the server code. If it's the standard Linux client then you specify "insecure" as part of the export eg /directory server(rw,no_root_squash,async,insecure)


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 ...


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/...


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 ...


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 ...


1

Yes, there is: it's called ls… The size reported by ls for a directory is the size of the directory contents. It isn't metadata of the directory, it's metadata of the files in the directory. Most of that is listed with ls -la. On some Unix variants, you can display the binary form of that data by calling cat (or od, etc.) on the directory. This is not the ...


1

The btrfs Wiki glossary says this about what a generation is: generation An internal counter which updates for each transaction. When a metadata block is written (using copy on write), current generation is stored in the block, so that blocks which are too new (and hence possibly inconsistent) can be identified. Another entry mentions that Under ...


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 ...


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 ...


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 ...


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 ...


0

A single inode number use to represent file in each file system. All hard links based upon inode number. File system reference link here .


0

An orphaned inode is a file that is “semi-deleted”: it has no more directory entry, but it's still open in some process, so the data is still present on the disk. When the last process that has this file open closes it, the file will be fully deleted and the orphaned inode will disappear. An orphaned inode uses both an inode and the disk space to store the ...


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 ...


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 ...


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 ...


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 ...


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 ...


0

First of all, you need to remove the requirement to use a password to log into your servers. Use public key based logins instead. Once you've don that, you'll need something like: $ for host in "server1" "server2" ; do echo $host; ssh $host df --output="ipcent" /tmp | tail -n1 | tr -d " "; done | pr --columns=2 --length=2 | mail bloggs@example.com ...


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 ...


0

You could do a simple curl command in a cron job, but I recommend you start using a monitoring solution with web monitoring capabilities. There are plenty of them for free, just google "Open Source web monitoring solutions" and you'll get plenty of them!


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 =...


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.


0

If it is associated with (application/octet-stream) it is probably a print file of some sort (gs, ps, or pcl). There are a lot of possibilities, but if you go to the cups interface or /etc/cups you should be able to see the print jobs. One is probably stuck and was moved there when a script when wrong. Do you use any sort of PS to PDF type functionality? ...


-2

Do sudo chmod ugo+rwx -R . (on the working directory). Also check for IO errors in dmesg.


0


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 ...


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 ...


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 ...


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 ...


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/...


0

It's probably copying files after mounting the squashfs which are files or directories that need editing. Example some files in /usr or /var will be copied over to ram during the boot process, unless the liveCD implemented an overlay filesystem like auFS or overlayfs with the former being used in the Gentoo Linux liveCD which doesn't required copying ...


0

$ /sbin/mkfs.ext4 test1 mke2fs 1.42.12 (29-Aug-2014) Discarding device blocks: done [...] Now there's a hint. Let's see what the manual says: -E extended-options discard Attempt to discard blocks at mkfs time (discarding blocks initially is useful on solid state devices and sparse / thin-provisioned storage). When the device advertises that ...


1

You have probably mistake somewhere. Either: You're trying to remove the file as unprivileged user, The file has file attributes: see them with lsattr ldlinux.sys, The directory you're trying to remove file from has file attributes, see them: lsattr . (in directory containing ldlinux.sys). Other conditions may apply, for example readonly filesystem, but ...


1

The command you shared will sync /media/masi/fat32/destinationDirectory/ (destination) on the basis of $HOME/SourceDirectory/ (source) and will delete those which from destination which are in extra in comparison to source. > --progress : will show you the process progress > -r : recursively > -t --times : This tells rsync to transfer ...


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,...


0

This issue was related to a hardware firewall that was not configured correctly for IPv6. Some additional steps I followed to help troubleshoot were to look at both iptables and ip6tables on both systems, even though IPv4 and IPv6 were working I needed to verify both protocols and the ports for both protocols. In this instance IPv4 and NFSv4 worked but not ...


0

As this question has many different answers, the following list should combine the suggestions into one comprehensive list: Under most circumstances you want to backup these: /home/ for user data and configuration /etc/ for system wide configuration files /var/ contains a mix of directories you usually want to backup and those you don't want to backup. ...


0

As I also want to add here... As /proc is the older version it contains the information of kernel device of that time period..as sysfs came with 2.6 kernel version so the device driver information makes their own directory by which it is a bit structured and easy to access..


0

(Avoiding covering what the others have said...) Can you start a container or virtual machine using the external disk? In that case, you could potentially have root on the VM/CT even if you don't on the host.


0

If you used rsync, possibly including --numeric-ids to preserve numeric ids, then things should just be right already. If you want to verify it, try dumping the permissions using stat, eg. find . -exec stat -c "%n %a %A" {} + | sort > oldpermissions.txt and then the same on the other machine, then you can diff the files to compare.



Top 50 recent answers are included