Find all files from current directory and subdirectories
find . -name '*.doc' -print
Finding files by date: http://www.cyberciti.biz/faq/howto-finding-files-by-date/
Show total disk usage of a directory:
du -sh /tmp/somedir
The tools I use for computer forensics.
Recuva – Excellent at recovering data from Windows partitions and free to boot.
UFS Explorer – Not free, but is able to recover from linux partitions (Recuva is better for FAT/NTFS)
explore2fs – Access linux partitions from Windows. Free.
HFSExplorer – Access Mac partitions from Windows
- Hiren’s Boot CD – Contains an impressive lineup of programs for computer forensics, but its legal status is often debated.
- Trinity Rescue Kit – A live distro with backup programs, Midnight Commander, testdisk, shell and other good stuff. Legal!
Casting the array obtained by invoking the toArray() method on a collection yields a ClassCastException.
String strings = listOfStrings.toArray();
will throw the ClassCastException.
The trick is to use the overloaded version of toArray(), which takes an array as parameter. This the javadoc description of the method
"Returns an array containing all of the elements in this list in the correct order; the runtime type of the returned array is that of the specified array."
The solution is therefore to do this:
String sv = (String)v.toArray(new String);