Get mounted partitions
$ sudo mount -l
Get creation date of file
$ debugfs -R 'stat <path_to_file>' <momunted_partition_path>
momunted_partition_path is the partition mouting path of path_file
| <?php | |
| $url = 'https://hostserver.com/gateway/remote_send'; | |
| $payload = array( | |
| 'profile_name' => 'username', | |
| 'profile_pw' => 'password1234', | |
| 'attached_type' => 'action_1' | |
| ); | |
| $file = realpath('/home/username/tests/test1234qwerty.csv'); | |
| // build multipart |
| # GET | |
| curl -i -u user:password http://localhost/productimage/create | |
| # POST | |
| curl -i -u user:password --data "param1=value1¶m2=value2" http://localhost/productimage/create |
| SELECT | |
| * | |
| FROM | |
| table | |
| INTO OUTFILE | |
| '/tmp/file.csv' | |
| FIELDS TERMINATED BY | |
| ',' | |
| ENCLOSED BY | |
| '"' |
Get mounted partitions
$ sudo mount -l
Get creation date of file
$ debugfs -R 'stat <path_to_file>' <momunted_partition_path>
momunted_partition_path is the partition mouting path of path_file
| SELECT table_name,table_schema FROM INFORMATION_SCHEMA.COLUMNS | |
| WHERE column_name='column_name'; |
| # compact | |
| tar -zcvf file.tar.gz source-folder | |
| # extract | |
| tar -zxvf file.tar.gz |
| tac file | grep -m 1 term |
| SELECT `AUTO_INCREMENT` | |
| FROM `information_schema`.`TABLES` | |
| WHERE `TABLE_SCHEMA` = SCHEMA() | |
| AND `TABLE_NAME` = 'tbl_name'; |
| # Reference: http://webcheatsheet.com/sql/mysql_backup_restore.php | |
| # import without compression | |
| mysql --host=host --user=user --password=password database < path_to_file.sql | |
| # import with compression | |
| gunzip < path_to_file.sql.gz | mysql --host=host --user=user --password=password database | |
| # export wihtout compression | |
| mysqldump --host=host --user=user --password=password database table --where="condition" > path_to_file.sql |
| RESET QUERY CACHE; |