Hot answers tagged

6

Definitely start with leaving the partition with the data alone, if at all possible (you would be surprised what you can recover even a month later if it is not your main system partition). Then proceed with foremost (I originally mentioned magicrescue but foremost performs just as well, yet it has a ready receipe for pdf sudo apt update && sudo apt ...


5

Simplest: xargs touch <List.txt The magic is that xargs takes every line in its stdin and adds it as an argument to the command.


2

touch /path_to_the_systems_directory/test1 This should work given you have the necessary privileges to write on the directory


2

Using GNU parallel in a script: #!/bin/bash constant=constant populate_file () { local const=$1 local file=$(basename -s '.M0.ctl' "$2") printf '%s\n%s\n%s\n' \ "seqfile = ${file}_p.phy" \ "treefile = ${const}.txt" \ "outfile = ${file}_M0_mlc" > "$2" } export -f populate_file parallel populate_file "$constant" {}.M0.ctl :::: ...


2

Can a program native to Linux fail "save as ..." and lose the file, or fail "save as..." and keep the file intact, or succeed in "save as ..."? In GNU/Linux, if a file is open by any program, it will be loaded into memory. If you moved or even delete the file in the disk, it will still be in memory. When you save it again, it would be saved from memory to ...


2

ext3grep was last updated ten years ago, and it lacks support for many features added to Ext3 and Ext4 since then. You can still try it, it won’t do anything on a file system using features which it doesn’t understand. Does it forget to put the two date .. '+%s' inside $()? Yes, I fixed the original. Where will it store the output files? As indicated ...


2

Using the zsh shell: counter=0 for name in $HOME/folder/*(.NDOm); do counter=$(( counter + 1 )) suffix=$name:e printf -v newname '%s/object%.3d%s' $name:h $counter ${suffix:+.$suffix} mv $name $newname done This iterates over all names of regular files in the ~/folder directory, from the oldest to the newes by last-modified timestamp. ...


1

Here's a version written in bash with GNU utilities that doesn't require parsing ls, and will handle any legally named file (embedded spaces, punctuation, newlines, etc.) #!/bin/bash k=0 # start at the beginning find *.foo -type f -printf "%T@ %p\0" | # list all the files with modification time ...


1

Is it correct that it doesn't require umounting the target partition or make it readonly? Yes, it's correct. umounting and making it read-only is always recommended because you must avoid writing anything on the filesystem that was holding the data. If you do, deleted files may be overwritten by new ones. Does running testdisk (quick/deep) search prevent ...


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