Copying files (specifically photos) from a macbook to a USB. Ps. i am new to bash and shell and all that, so a description on how to do it too is very much appreciated (sorry if bad english)
相关问题
- How to get the return code of a shell script in lu
- JQ: Select when attribute value exists in a bash a
- Invoking Mirth Connect CLI with Powershell script
- Emacs shell: save commit message
- bash print whole line after splitting line with if
相关文章
- 使用2台跳板机的情况下如何使用scp传文件
- In IntelliJ IDEA, how can I create a key binding t
- Check if directory exists on remote machine with s
- shell中反引号 `` 赋值变量问题
- How get the time in milliseconds in FreeBSD?
- Reverse four length of letters with sed in unix
- Launch interactive SSH bash session from PHP
- BASH: Basic if then and variable assignment
Here are some things to get you started...
You can get the mount point of an external, physical drive like this:
So, if you want that in a variable do:
Sample Output
You can get a list of
JPG
/jpg
/JPEG
/jpeg
/PNG
/png
files in the users' HOME directories with:Simplistically, you could now exec
cp
for each file you find to copy it to your USB drive. However, there are some issues with that - what if you have a file calleda.jpg
in two different directories - only the second one to be copied will end up on your USB.