This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
keller_and_evans_lab:unix_basics [2016/03/08 21:17] scott Created page with "==Basics== moves or renames files mv file destination copies files cp file destination lists files in directory ls ls -ltrah..." |
keller_and_evans_lab:unix_basics [2019/10/28 18:20] (current) lessem ↷ Page moved from unix_basics to keller_and_evans_lab:unix_basics |
||
---|---|---|---|
Line 184: | Line 184: | ||
A directory | A directory | ||
tar -cvzf tar.file.name.tar directory | tar -cvzf tar.file.name.tar directory | ||
- | __Extract | + | Extract |
tar -xvf tar.file.name.tar | tar -xvf tar.file.name.tar | ||
- | \\ | + | |
- | __Extract | + | Extract |
tar -zxvf tar.file.name.tar.gz | tar -zxvf tar.file.name.tar.gz | ||
- | \\ | + | |
- | __Extract | + | Extract |
for i in *.tar.gz; do tar -zxvf " | for i in *.tar.gz; do tar -zxvf " | ||
- | \\ | + | |
- | \\ | + | |
- | \\ | + | ====== |
- | | + | |
- | ./ | + | |
- | ./ | + | ./ |
- | ./ | + | |
- | \\ | + | |
- | \\ | + | |
- | \\ | + | |
- | | + | |
- | ./ | + | ====== |
- | sleep 45m | + | |
- | ./ | + | |
- | sleep 45m | + | ./ |
- | ./ | + | |
- | sleep 45m | + | |
- | \\ | + | |
- | \\ | + | |
- | \\ | + | |
- | | + | |
+ | |||
+ | |||
+ | ====== | ||
find /directory -type f -ctime -xx | more | find /directory -type f -ctime -xx | more | ||
- | \\ | + | |
- | \\ | + | |
- | \\ | + | ====== |
- | * | + | |
less file1 file2 file3 | less file1 file2 file3 | ||
:n forward to next file | :n forward to next file | ||
:p backward to previous file | :p backward to previous file | ||
- | \\ | + | |
- | \\ | + | |
- | \\ | + | ====== |
- | * | + | |
- | After you have modified one of the files above, you need to refresh your OS so it uses the correct .bashrc or .bash_profile settings. You can either restart the computer, logout and log back in, or do this: \\ | + | After you have modified one of the files above, you need to refresh your OS so it uses the correct .bashrc or .bash_profile settings. You can either restart the computer, logout and log back in, or do this: |
source ~/ | source ~/ | ||
- | \\ | + | |
- | \\ | + | |
- | \\ | + | ====== |
- | * | + | |
lwp-download http:// | lwp-download http:// | ||
OR | OR | ||
wget http:// | wget http:// | ||
- | \\ | + | |
- | \\ | + | |
- | \\ | + | ====== |
- | * | + | |
find ./ -mtime -5 -exec cp {} ~new/ | find ./ -mtime -5 -exec cp {} ~new/ | ||
Make sure that the target folder isn't in the folder being found; i.e., that ~/ | Make sure that the target folder isn't in the folder being found; i.e., that ~/ | ||
- | \\ | + | |
- | \\ | + | |
- | \\ | + | ====== |
- | * | + | |
cat / | cat / | ||
cat / | cat / | ||
- | | + | cat / |
- | \\ | + | |
- | \\ | + | |
- | \\ | + |