find . -type f -name "*.xml" | xargs -i mv {}
This is my cheat sheet if I have to look back for an answer for problems. You're welcome to add or comment the answer.
Thursday, January 5, 2012
Linux moving or deleting large files getting Argument List Too Long
When you try to move or delete a lot of files in linux cli and getting Argument List Too Long, you can try to filter it by
find . -type f -name "*.xml" | xargs -i mv {}
find . -type f -name "*.xml" | xargs -i mv {}
Wednesday, January 4, 2012
Mysql Export and Import from select statement
To export into a csv file from a select statement in mysql, the command is
SELECT * INTO OUTFILE 'data.txt'
FIELDS TERMINATED BY ','
FROM table2;
To read the comma-delimited file back in, the correct statement would be:
LOAD DATA INFILE 'data.txt' INTO TABLE table2
FIELDS TERMINATED BY ',';
SELECT * INTO OUTFILE 'data.txt'
FIELDS TERMINATED BY ','
FROM table2;
To read the comma-delimited file back in, the correct statement would be:
LOAD DATA INFILE 'data.txt' INTO TABLE table2
FIELDS TERMINATED BY ',';
Subscribe to:
Posts (Atom)