Tag Info

Hot answers tagged

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


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.


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


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


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


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


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


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

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


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


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


1

From Wikipedia Buffers are also flushed when filesystems are unmounted or remounted read-only, for example prior to system shutdown.


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


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


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.


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


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

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

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.


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



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