LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > GlennsPref
User Name
Password

Notices


Rate this Entry

How to recover lost mp3's for free-p3 of 8. (formatting, sheesh!)

Posted 05-11-2010 at 11:16 PM by GlennsPref

Code:
Code:
png: 77 recovered
ogg: 60 recovered
gpg: 6 recovered
others: 8 recovered
you need to quit each page until you are back in the bare shell. Post-recovery clean-up Prior to sorting and renaming, and the last job we need to do as root, is change the file permissions to my user and group. In my case, user glenn and group glenn with chown and chmod to make them readable,writeable and executable.
Code:
sudo chown -hR glenn:glenn /home/glenn/storage/recovery
#change user and group to glenn
sudo chmod -R 775 /home/glenn/storage/recovery
#make writeable by a program and user
…..type exit and hit enter to quit the shell as root. Using find to list and sort files ref. Shawn Hermans I wanted to copy all the mp3 files to a directory and also filter off the files I thought would be too small to be useful as an mp3 with any quality, I set it for 2Mb 2048kb's and also made a dir small for the small files that I would not bother renaming.
Code:
mkdir /home/glenn/storage/recovery/mp3
mkdir /home/glenn/storage/recovery/small
find does not use the standard sequence off directives in GNU/Linux use 'man find' and 'man xargs' to get the lowdown on these tools. Type q to quit at any time from the man page. Excerpt from man find...find uses 'find source arguments expression destination'...
Code:
NON-BUGS
       $ find . -name *.c -print
       find: paths must precede expression
       Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]

       This happens because *.c has been expanded by the shell resulting in find actually receiving a
       command line like this:

       find . -name bigram.c code.c frcode.c locate.c -print

       That  command  is  of  course not going to work.  Instead of doing things this way, you should
       enclose the pattern in quotes or escape the wildcard:
       $ find . -name '*.c' -print
       $ find . -name \*.c -print
Posted in Uncategorized
Views 539 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 06:38 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration