刪除文件命令rm -f文件名
下載數(shù)據(jù)到本地下載目錄:sz filename1 filename2 …
上傳數(shù)據(jù)到遠程:執(zhí)行rz –be命令共苛,客戶端會彈出上傳窗口,用戶自行選擇(可多選)要上傳的文件即可凛虽。
wyp.txt文件中的數(shù)據(jù)列之間是使用\t分割的,可以通過下面的語句將這個文件里面的數(shù)據(jù)導(dǎo)入到wyp表里面广恢,操作如下:
wyp.txt文件中的數(shù)據(jù)列之間是使用\t分割的凯旋,可以通過下面的語句將這個文件里面的數(shù)據(jù)導(dǎo)入到wyp表里面,操作如下:
1.hive> load data local inpath'abc.txt' into table wyz;
2.Copying data from file:/home/wyp/wyp.txt
3.Copying file: file:/home/wyp/wyp.txt
4.Loading data to table default.wyp
5.Table default.wyp stats:
6.[num_partitions: 0, num_files: 1,num_rows: 0, total_size: 67]
7.OK
8.Time taken: 5.967 seconds
復(fù)制代碼
這樣就將wyp.txt里面的內(nèi)容導(dǎo)入到wyp表里面去了钉迷,可以到wyp表的數(shù)據(jù)目錄下查看至非,如下命令:
1.hive> dfs -ls/user/hive/warehouse/wyp ;
2.Found 1 items
3.-rw-r--r--3 wyp supergroup 67 2014-02-1918:23 /hive/warehouse/wyp/wyp.txt
Crontab是個好東西,可以定時執(zhí)行任務(wù)
[root@hive-m ~]# crontab -l
0 * * * * /usr/sbin/ntpdate 114.112.91.219
*/1 * * * * /root/hivemonitor.sh
[root@hive-m ~]# crontab -e
0 * * * * /usr/sbin/ntpdate 114.112.91.219
*/1 * * * * /root/hivemonitor.sh
查看linux主機版本型號:
Uname –a
Cat /proc/version
Cat /etc/issue
rpm -qa |grep -i
"ftp"
查看是否有vsftpd之類的ftp server軟件
第一步:安裝vsftp pam db4
yum install vsftpd pam* db4* -y
使用命令將vsftp配置為系統(tǒng)服務(wù)
chkconfig --level 35 vsftpd on
下圖為主機119.57.155.25已有的定時執(zhí)行的腳本:
寫完之后枷颊,按esc,就可以退出編輯模式了,然后:wq即可夭苗。