Query Command
sfdx force:data:soql:query -q "Select id , Name ,Passenger_Code__c,Reg_Number__c ,Vehicle_Id__c from Vehicle__c"
sfdx force:data:soql:query -q "SELECT Name FROM ApexTrigger" -t
Export Command
sfdx force:data:tree:export -q "select Id,Name, Passenger_Code__c, Reg_Number__c, Vehicle_Id__c,(Select Id,Name,Office_Id__c,Violations_Id__c from Violations__r) from Vehicle__c " -x export-demo -d /force-app/data
"records": [ { "attributes": { "type": "Vehicle__c", "referenceId": "Vehicle__cRef1" }, "Name": "V1", "Violations__r": { "records": [ { "attributes": { "type": "Violations__c", "referenceId": "Violations__cRef1" }, "Name": "VO0", "Office_Id__c": "3278640", "Violations_Id__c": "2387627836120" }, { "attributes": { "type": "Violations__c", "referenceId": "Violations__cRef2" }, "Name": "V1" } ] } }, ...... ]
Import Command
Create/Update/Delete Commands
sfdx force:data:record:create -s Account -v "Name='Universal Containers' Website=www.example.com"
sfdx force:data:record:delete -s Account -i 001D000000Kv3dl
sfdx force:data:record:update -s Account -i 001D000000Kv3dl -v "Name=NewAcme"
Bulk Commands
You can use Bulk commands to delete or upsert the data into Bulk API Style.
sfdx force:data:bulk:upsert -s MyObject__c -f ./path/to/file.csv -i MyField__c
Above Command Inserts or updates records from a CSV file with one or more batch based on the CSV, file size and Returns a job ID and a batch ID. Use these IDs to check job status with data:bulk: status as shown below.
sfdx force:data:bulk:status -i 750xx000000005sAAA
Below are some of the useful reference about salesforce DX