I needed to upload some backups, then move them to my /home directory. I only use Linux a little bit, not even every day (But moreso recently), so sometimes the simple things are hard.
I was doing this:
mv backup-9.16.2010_15-28-13_user.tar.gz /home/backup-9.16.2010_15-28-13_user.tar.gz
and then repeating for each file. Then I tried
mv backup-9.16.2010*.gz /home/backup-9.16.2010*.gz
and got an error that /home/backup-9.16.2010*.gz was not a directory, leading me to understand that
mv backup-9.16.2010*.gz /home
Was all I needed.
The author worked as a PHP / MySQL programmer for a Tampa Web Design Company for several years. He has now started his own Web Developer company and is recruiting clients.
Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts
Friday, September 17, 2010
Monday, July 13, 2009
Delete Linux files with illegal Characters
If a file has been created with invalid or illegal characters, your FTP program or the rm command may choke on it. Here's a quick way to delete it in ssh.
navigate to the correct directory, then:
ls -il
You'll see somehthing like
782263 -rw-r--r-- 1 viv viv 0 2006-01-27 15:49 \+Xy \+\8
"\+Xy \+\8" represents the bad filename
find . -inum 782263 -exec rm -i {} \;
replace 782263 with the number associated with your bad filename.
You'll be prompted to verify the correct file is being delted. Type "y" and "Enter" if it is correct.
This information came from:
http://www.cyberciti.biz/tips/delete-remove-files-with-inode-number.html
navigate to the correct directory, then:
ls -il
You'll see somehthing like
782263 -rw-r--r-- 1 viv viv 0 2006-01-27 15:49 \+Xy \+\8
"\+Xy \+\8" represents the bad filename
find . -inum 782263 -exec rm -i {} \;
replace 782263 with the number associated with your bad filename.
You'll be prompted to verify the correct file is being delted. Type "y" and "Enter" if it is correct.
This information came from:
http://www.cyberciti.biz/tips/delete-remove-files-with-inode-number.html
Subscribe to:
Posts (Atom)