[root@localhost ~]# tar -caf tar_gzip.tar.gz file
[root@localhost ~]# tar -tf tar_gizp.tar.gz
file1
file2
file3
file.zip
[root@localhost ~]# tar -cjf tar_bizp2.tar.bz2 *file
[root@localhost ~]# tar -tf tar_bizp2.tar.bz2
aafile
afile
bbfile
bfile
ccfile
cfile
zfile
zzfile
[root@localhost ~]# tar cjf tar_xz.tar.xz file*
[root@localhost ~]# tar tf tar_xz.tar.xz
file1
file2
file3
file.zip
[root@localhost ~]# tar czf tar_file.tar.gz --exlude=file.txt/file3.txt file.txt
[root@localhost ~]# tar tf tar_file.tar.gz
file.txt/
file.txt/file1.txt
file.txt/file2.txt
[root@localhost ~]# tar -rf ar_file.tar.gz file4.txt
tar:file4.txt:Cannot stat:No such file or directory
tar:Exiting with failure status due to prexious errors
[root@localhost ~]# tar tf tar_file.tar.gz
file.txt/
file.txt/file1.txt
file.txt/file2.txt
file.txt/file4.txt
[root@localhost ~]# tar czf tar_file.tar.gz --exclude=file.txt/file3.txt fole.txt
[root@localhost ~]# tar -xzf tar_gzip.tar.gz -C tar_test
[root@localhost ~]# tar tf tar_test
tar:tar_test:Cannot read:Is a dirctory
tar:At beginning of tape,qutting now
tar:Error is not recoverable:exting now
[root@localhost ~]# tar -xf tar_xz.tar.xz
sftp > put C:\Users\暑假网课\Desktop\Windows.txt/root/
Uploading C:/Users/暑假网课/Desktop/Windows.txt to/root/Windows.txt
C:/Users/暑假网课/Desktop/Windows.txt
unip_data.txt
vim1.txt
vim.txt
vim.txt
Windows.txt
zfile
zzfile
sftp> get/root/Liunx.txt C:\Users\暑假网课\Desktop
Fetching/root/Liunx.txt to C:/暑假网课/Desktop/LIunx.txt
[root@localhost ~]# local_data=1
[root@localhost ~]# $local_data
bash:l:command not found...
[root@localhost ~]# export ROOT_DATA=root:$ROOT
[root@localhost ~]# echo $ROOT
[RHCSA1@localhost ~]$ export USER_DATA=user;$USER
fi
fi
DATA=all
[root@localhost ~]# find -name "test*.txt" -print
./test1.txt
./test2.txt
./test3.txt
[root@localhost ~]# alias 'myfind=find -name "test*.txt" -print'
[root@localhost ~]# myfind
./test1.txt
./test2.txt
./test3.txt
[root@localhost ~]# unalias myfind
[root@localhost ~]# myfind
bash:myfind:command not find...
[root@localhost ~]# history 10
289 myfind=find -name "test*.txt" -printf
290 myfind=find -name "test*.txt" -print
291 myfind='find -name "test*.txt" -print'
292 alias 'myfind=find -name"test*.txt" -print'
293 myfind
294 unalias myfind
295 myfind
296 hietory
297 history -10
298 history 10
[root@localhost ~]# echo 123;su RHCSA1
123
[RHCSA@localhost root]$
[root@localhost ~]# data=1234
[root@localhost ~]# data1='1234'
[root@localhost ~]# data2="123"
[root@localhost ~]# data3=`pwd`
[root@localhost ~]# data4=$(pwd)