How to , and other stuff about linux, photo, php … A linux, photography blog. To remember some linux situation, and fix them quickly.

March 31, 2008

/bin/rm: Argument list too long

Filed under: Linux — admin @ 2:23 pm

If you try to remove some file and recive that error. Then one solution is to combine find with xargs.

find . -name ‘spam-*’ | xargs rm

This will send one line to the rm command.

If the filenames involved have spaces, you will need to do use find’s
“-print0” option in conjunction with xargs’s “-0” option. otherwise the
shell that xargs uses to execute the “rm” command line will treat the
space as a token separator, thereby treating the name as two (or more)
names, none of which are the thing you’re trying to actually delete.
the command line should look like this…

find . -name ‘spam-*’ -print0 | xargs -0 rm

How to Use SSH

Filed under: Linux — admin @ 2:22 pm

This is the most simplest tutorial of SSH. I had been surfing the Internet for a long
time to get this done, but it was not getting done.
Here are the steps that anyone should follow.

(more…)

How to restore/repair/recover a mySQL Database/Table

Filed under: Linux — admin @ 2:21 pm

From time to time mySQL databases can get corrupt, whether it due to lack of disk space, power failure, or just an error.

Repairing MyISAM mySQL Tables/Databases:

cd /var/lib/mysql/DBNAME
#^ Please note that we assume your mySQL data directory is /var/lib/mysql

myisamchk *.MYI

Repairing ISAM mySQL Tables/Databases:

cd /var/lib/mysql/DBNAME
#^ Please note that we assume your mySQL data directory is /var/lib/mysql

isamchk *.MYI

Viewing .htaccess via FTP using Total Commander

Filed under: Linux — admin @ 2:21 pm

If you are using Total Commander, and you didn’t see the hidden files from a remote ftp server.

Then you should edit wcx_ftp.ini (standard installation it’s in c:\windows\wcx_ftp.ini )

After the [General] section please add
FtpShowHidden=1

Save the file, restart the Total Commander, and after that you should see all files.

Fix syslog with FC2

Filed under: Linux — Tags: , , — admin @ 2:20 pm

If you have Fedora Core 2, and recive mail from logrotate with

etc/cron.daily/logrotate:

error: error running postrotate script

(more…)

« Newer PostsOlder Posts »

Powered by WordPress