-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbasic_commands
36 lines (25 loc) · 1.32 KB
/
basic_commands
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//to activate env in ubuntu server
source /home/ubuntu/myenv/bin/activate
//to connect to EC2
ssh -i pemfilename.pem [email protected]
//to copy a file from your system to EC2 machine
scp -i pemfilename.pem delete_old_backup_tables.py [email protected]:ingestion/delete_old_backup_tables.py
//to copy a folder from your system to EC2 machine
scp -i pemfilename.pem -r C:\Users\ShashwatKumar\Desktop\Folder_Name [email protected]:/folder/
//move all files within a directory to another path
1. go to the directory where u have all files
2. mv * /home/ubuntu/brix_ingestion/
or
mv -v /home/ubuntu/zpizza_ingestion/zpizza_ingestion/* /home/ubuntu/zpizza_ingestion/
//download a folder from server to your local machine
scp -i pemfilename.pem [email protected]:intel_ingestion .
//download a file from server to your local machine
scp -i hxdataplatform.pem [email protected]:dbt/target/index.html .
//remove a file
rm tbls_creation_log.log
find and replace on ec2
sed -i 's/print/logging.info/g' read_files.py
//to move files from ec2 to s3
aws s3 cp /home/ubuntu/hyvee_test/test/downloads/TransactionDetails_20211108.csv.gz s3://hypersonixdata/Smart_n_Final/upload_test/TransactionDetails_20211108.csv.gz
#to pass git without worrying about precommits :)
git commit -n -m "precommits kyu pass karu, main kaunsa achha developer hu"