My SQL
Grant a user to a databasemysql>grant all on db_name.* to 'db_username'@'localhost' identified by 'db_userpasswd'
dump a database to a sql filemysqldump -u root -p --opt leo_db>dump.sql
vi
Auto replace string in vi:%s/pattern_search_for/new_string_to_be_used/gc
Open and create compressed files
Open filestar zxvf filename.tar.gz
unzip filename.zip
tar -xvf my.tar
bunzip2 studybuzz.bz2
bzip2 -d studybuzz.bz2
tar jxvf studybuzz.tar.bz2
unrar e test.rar
Create a zip file without parent directory
/test/test.txt
/test/test2.txt
cd test
zip -r -j my.zip *
Create fileszip -r filename.zip filedir
tar -cvf my.tar filedir
Print Env Variables
printenv
curl
curl -H "x-api-key:1234" http://myapi.com/user/1
#The -v option activates verbose mode, revealing detailed communication logs between the client and server
curl -v -H "x-api-key:1234" http://myapi.com/user/1
#curl does not follow HTTP redirects by default. Use the -L, --location option to tell it to do that
curl -L -H "x-api-key:1234" http://myapi.com/user/1
No comments:
Post a Comment