Tag Info

New answers tagged

1

The default behaviour for most Linux file systems is to safeguard your data. When the kernel detects an error in the storage subsystem it will make the filesystem read-only to prevent (further) data corruption. You can tune this somewhat with the mount option errors={continue|remount-ro|panic} which are documented in the system manual (man mount). When ...


1

In addition to the searches recommended by terdon, you could also search by the folder name. So if someone deleted (or moved) the files using a wildcard, you may not find any of your filenames specified in any history file. For example, if someone did: $ cd /home/mydir $ rm * Or $ cd somewhere-else $ mv /home/mydir/* . You wouldn't find any of your ...


2

If it's possible they were moved, try to find them with locate - that would find them if they were moved a while ago, before last run of updatedb (typically daiy): locate --existing --basename 'foo.txt' or using short options: locate -eb 'foo.txt' If that does not find them, you could use the find command. Guess where it could be to choose a ...


5

As a brute force approach, assuming you have access to all user directories and that all users are using bash as their default shell, you could search through their history files: grep 'deletedfilename' /home/*/.bash_history Assuming they were deleted recently enough for the command to still be saved in the user's shell history, that will show you who ...


2

while read -r line; do mkfs.ext4 "$line" done < <(df -k | grep 'media' | cut -d ' ' -f 1) The df command with the grep and cut pipes would give us the list of external hard drive mounts. For instance, the external hard disk will always get mounted automatically to /media in most of the systems. So, I am using df command to check the mounts of the ...


1

Ubuntu is capable of reading and writing files stored on Windows formatted partitions. These partitions are normally formatted with NTFS, but are sometimes formatted with FAT32. You will also see FAT16 on other devices. General Considerations Ubuntu will show files and folders in NTFS/FAT32 filesystems which are hidden in Windows. Consequently, important ...


6

Linux can read (and write) to many filesystems, including ntfs, which is likely how your windows partitions are formatted. Many OS installers (including Ubuntu apparently) will scan your disks for any partitions that Linux knows how to mount, and set those up to be mounted at boot, which is why you can access them.


0

Since the 3.6 kernel ext4 suppports metadata checksumming (you'll also need e2fsprogs 1.43+) but it's not clear just how stable this feature is. Additionally you can mount your ext4 filesystem with the journal_checksum feature but... ...it seems like at some point in the past people wanted to make this a default option but this change didn't happen due to ...


0

I think you are mixing up two completely different and independent concepts. The large_file feature that you can see in the output of dumpe2fs means that this filesystem can hold files larger than 2 GiB, I think it is set automatically by modern kernels. It has nothing to do with the -T option of mke2fs.


0

Most distributions have a command called by blkid. blkid will give you a unique identifier for each drive attached to you linux box. Fstab can uses this identifier, replace the /dev/sdc1 with UUID=XXXXXXXXXXXXX. This means that regardless of the user-space designation (e.g. sdc1 scb2 et cetera) your OS will mount it correctly.


0

The answers to this superuser question should answer your question. A few selected quotes: It will just be mounted, and the files disappear, coming back when the folder is umounted. ... It works like a stack, if you mount something else, it hides the previous content. When you unmount, the previous stuff becomes visible again. ... ...


2

If you're absolutely sure that the end of the last partition fits on the target drive, you can copy the drive wholesale. Don't use dd, which is slower (unless used with additional options, and not always even then) and more error-prone; simply use cat. cat /dev/sdc >/dev/sdz Replace /dev/sdz by the proper path to the drive that you want to overwrite. ...


0

Any easy way to improve fsck times even further? @HaukeLaging is right, things can be sped up by changing the density of inodes on the file system. See newfs -i.


1

Mount them read-only, when possible, and the fsck won't be necessary. But you really need to be more specific (what partitions are you talking about? Were's just guessing without and fstab) and especially understand that things happen like that for a reason. E.g. sshd is on /usr and your user profile is on /home. Assuming these are separate partitions, ...


1

You can use dd to create copies of the partitions and not of all the device. dd if=/dev/sad1 of=/tmp/boot.img dd if=/dev/sad2 of=/tmp/root.img As for Q2b: I did this several times, never had a problem, but still this is not recommended.


0

Sounds like the file still in use (opened by other application) Try these steps Identify PID of the application that is still using the file by lsof <fielname>, let's say 12345 for example Go to /proc/12345/fd directory, hopefully you see a link that links to the file you want Try to copy it to another location


1

Each underlying filesystem is assigned a precedence. If there are duplicate filenames, the one from the higher precedence filesystem is the visible one, the others are hidden. See http://superuser.com/questions/326190/how-does-unionfs-work


3

On the surface, what you've suggested you've tried works for me. Example $ mkdir -p test/src test/firefox $ tree --noreport -fp . `-- [drwxrwxr-x] ./test |-- [drwxrwxr-x] ./test/firefox `-- [drwxrwxr-x] ./test/src Make the symbolic link: $ ln -s test/src test/firefox $ tree --noreport -fp . `-- [drwxrwxr-x] ./test |-- [drwxrwxr-x] ...


0

cp -rfp from_dir to_dir -r - recursive -f - force -p - preserve attributes: mode, ownership, timestamps


3

for f in *.csv; do IFS= read -r line < "$f" && case $line in (*HEADER*) continue; esac printf >&2 'ERROR: Missing HEADER record for "%s"\n' "$f" mv -- "$f" "${f%.*}.head" done


1

Try: for _file in *.csv do if ! grep -q 'HEADER' <(head -n 1 -- "$_file") then echo >&2 "ERROR: Missing HEADER record for $_file" # mv -- "$_file" "${_file%.*}.head" echo "$_file" "${_file%.*}.head" fi done Using echo line to verify if it works right, if everything ok, try mv line.


1

I believe that adding nobootwait to the fstab entries would work, but openbsd may not implement that. mountalll, used with Upstart, does. I think systemd does too.


0

May be this? http://en.wikipedia.org/wiki/Log-structured_file_system Hope, this helps!


0

Remove/comment the entries in /etc/fstab which you to want to avoid automatic mount while booting. Then make a entry in /etc/rc.local file in the complete mount command format


2

Edit your /etc/fstab file so that the fourth field of the file systems you want to delay mounting have the noauto option set. You can then set up a script that you either run manually, or set up in the rc scripts to run after SSH is started to fsck and mount the remaining file systems. From reading the man page for OpenBSD /etc/fstab, you may also want to ...


2

Mbox is a sandbox tool capable of committing the filesystem changes as a whole, and it allows the user to see the diff for each change. It works by using system call interposition.


2

As of 2014, it has come back to life and there is a new release out now! There is also life and discussion on the mailing list: http://lists.gobolinux.org/mailman/listinfo/gobolinux-users


4

Just use a loop in the shell: for x in * ; do mv -- "$x" "$((i=i+1)).jpg" ; done We look at each file in the current directory one at a time, calling it x, and then move it to $i.jpg, where we increment $i by one each time. $((...)) is arithmetic expansion, and assignments return the value assigned, so this both modifies i and returns the new number each ...


1

You can use fdisk to change your partition table while running.Refer this link http://codesilence.wordpress.com/2013/03/14/live-resizing-of-an-ext4-filesytem-on-linux/


1

You need to make sure Apache has permissions all the way down to the public folder. Other then that it should wok fine, I do it all the time. cmhod o+rx /mnt chmod o+rx /mnt/hgfs/ chmod o+rx /mnt/hgfs/foldername apache probable can't get into mnt


8

Assume partition as just the rooms in the newly constructed house. It just doesn't have any layout or anything till now. All you have done is constructed new rooms in the house. Now, you need to have the rooms designed for specific purposes (for example, the kitchen has to have more storage shelves, the living room has to have more space to accommodate TV ...



Top 50 recent answers are included