Advertisement
ubunchu

move_files_from_folders

Oct 24th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.97 KB | None | 0 0
  1. [ubunchu@ubunchu a1command]$ ls -l
  2. total 12
  3. drwxr-xr-x 2 ubunchu users 4096 Oct 24 16:15 excerpt
  4. drwxr-xr-x 6 ubunchu users 4096 Oct 24 16:16 extract_these_files
  5. drwxr-xr-x 2 ubunchu users 4096 Oct 24 16:35 nevermind_this
  6.  
  7. [ubunchu@ubunchu a1command]$ ls -l extract_these_files/
  8. total 16
  9. drwxr-xr-x 2 ubunchu users 4096 Oct 24 16:16 folder1
  10. drwxr-xr-x 2 ubunchu users 4096 Oct 24 16:17 folder2
  11. drwxr-xr-x 2 ubunchu users 4096 Oct 24 16:18 folder3
  12. drwxr-xr-x 2 ubunchu users 4096 Oct 24 16:18 folder3.1
  13.  
  14. [ubunchu@ubunchu a1command]$ cd
  15.  
  16. [ubunchu@ubunchu ~]$ find Terminalling/a1command/extract_these_files/ -type f | xargs -I file basename file | xargs -I file mv file Terminalling/a1command/excerpt/`date +%N`file
  17. mv: cannot stat ‘thisisalogfile.log’: No such file or directory
  18. mv: cannot stat ‘thisisalogfile.log’: No such file or directory
  19. mv: cannot stat ‘thisisalogfile.log.baqup’: No such file or directory
  20. mv: cannot stat ‘thisisalogfile.log.baqup.july’: No such file or directory
  21. mv: cannot stat ‘thisisalogfile.log.baqup.july~’: No such file or directory
  22. mv: cannot stat ‘thisisalogfile.log’: No such file or directory
  23.  
  24. [ubunchu@ubunchu ~]$ find $USER Terminalling/a1command/extract_these_files/ -type f | xargs -I file basename file | xargs -I file mv file $USER Terminalling/a1command/excerpt/`date +%N`file
  25. find: `ubunchu': No such file or directory
  26. mv: target ‘Terminalling/a1command/excerpt/590456619thisisalogfile.log’ is not a directory
  27. mv: target ‘Terminalling/a1command/excerpt/590456619thisisalogfile.log’ is not a directory
  28. mv: target ‘Terminalling/a1command/excerpt/590456619thisisalogfile.log.baqup’ is not a directory
  29. mv: target ‘Terminalling/a1command/excerpt/590456619thisisalogfile.log.baqup.july’ is not a directory
  30. mv: target ‘Terminalling/a1command/excerpt/590456619thisisalogfile.log.baqup.july~’ is not a directory
  31. mv: target ‘Terminalling/a1command/excerpt/590456619thisisalogfile.log’ is not a directory
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement