How can i copy files from any usb stick to user's home directory using terminal commanld line?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
As i mentioned in my question title above i have a usb stick that contains the folders "theme" and "icons". I want to copy those 2 folders in the folder home/andrew/.config folder of my computer or any other computer. How can i do that using the terminal?
I am on a Linux Mint xfce system.
linux linux-mint terminal xfce xfce4-terminal
add a comment |
up vote
0
down vote
favorite
As i mentioned in my question title above i have a usb stick that contains the folders "theme" and "icons". I want to copy those 2 folders in the folder home/andrew/.config folder of my computer or any other computer. How can i do that using the terminal?
I am on a Linux Mint xfce system.
linux linux-mint terminal xfce xfce4-terminal
2
If it's just a one-time copy, runningcp -r src-dir dest-dir
should be sufficient. Are you looking for something more advanced?
– Haxiel
Dec 2 at 13:47
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
As i mentioned in my question title above i have a usb stick that contains the folders "theme" and "icons". I want to copy those 2 folders in the folder home/andrew/.config folder of my computer or any other computer. How can i do that using the terminal?
I am on a Linux Mint xfce system.
linux linux-mint terminal xfce xfce4-terminal
As i mentioned in my question title above i have a usb stick that contains the folders "theme" and "icons". I want to copy those 2 folders in the folder home/andrew/.config folder of my computer or any other computer. How can i do that using the terminal?
I am on a Linux Mint xfce system.
linux linux-mint terminal xfce xfce4-terminal
linux linux-mint terminal xfce xfce4-terminal
asked Dec 2 at 13:20
Designer
1015
1015
2
If it's just a one-time copy, runningcp -r src-dir dest-dir
should be sufficient. Are you looking for something more advanced?
– Haxiel
Dec 2 at 13:47
add a comment |
2
If it's just a one-time copy, runningcp -r src-dir dest-dir
should be sufficient. Are you looking for something more advanced?
– Haxiel
Dec 2 at 13:47
2
2
If it's just a one-time copy, running
cp -r src-dir dest-dir
should be sufficient. Are you looking for something more advanced?– Haxiel
Dec 2 at 13:47
If it's just a one-time copy, running
cp -r src-dir dest-dir
should be sufficient. Are you looking for something more advanced?– Haxiel
Dec 2 at 13:47
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Given your username is Andrew or rather andrew
, it will most likely be mounted under /media/andrew/a_volume_name
. So first you need to get this full path. You can store it in a shell variable to make things easy:
ls /media/andrew
See or find the right entry in the output, and now save it in the source directory variable:
s_dir=/media/andrew/my_usb_drive
Of course replace my_usb_drive
with the right name. Once you have this, enter this command:
cp -r "$s_dir"/theme "$s_dir"/icons /home/andrew/.config
Is there any wild card for the usb path? For example how can i copy my usb folders to a friend's computer if i dont know the name of his home directory?
– Designer
Dec 2 at 15:42
Runls /home
...
– Panther
Dec 2 at 16:03
The usb mount point is variable. /media is deprecated in many modern OS. Runmount
to find the mount point
– Panther
Dec 2 at 16:05
1
~
is a variable which directly references the current users home directory.
– Panki
Dec 2 at 17:15
1
@Designer This is too broad to automate easily, though it may be done, as per the comments above.
– Tomasz
Dec 2 at 17:21
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Given your username is Andrew or rather andrew
, it will most likely be mounted under /media/andrew/a_volume_name
. So first you need to get this full path. You can store it in a shell variable to make things easy:
ls /media/andrew
See or find the right entry in the output, and now save it in the source directory variable:
s_dir=/media/andrew/my_usb_drive
Of course replace my_usb_drive
with the right name. Once you have this, enter this command:
cp -r "$s_dir"/theme "$s_dir"/icons /home/andrew/.config
Is there any wild card for the usb path? For example how can i copy my usb folders to a friend's computer if i dont know the name of his home directory?
– Designer
Dec 2 at 15:42
Runls /home
...
– Panther
Dec 2 at 16:03
The usb mount point is variable. /media is deprecated in many modern OS. Runmount
to find the mount point
– Panther
Dec 2 at 16:05
1
~
is a variable which directly references the current users home directory.
– Panki
Dec 2 at 17:15
1
@Designer This is too broad to automate easily, though it may be done, as per the comments above.
– Tomasz
Dec 2 at 17:21
add a comment |
up vote
0
down vote
Given your username is Andrew or rather andrew
, it will most likely be mounted under /media/andrew/a_volume_name
. So first you need to get this full path. You can store it in a shell variable to make things easy:
ls /media/andrew
See or find the right entry in the output, and now save it in the source directory variable:
s_dir=/media/andrew/my_usb_drive
Of course replace my_usb_drive
with the right name. Once you have this, enter this command:
cp -r "$s_dir"/theme "$s_dir"/icons /home/andrew/.config
Is there any wild card for the usb path? For example how can i copy my usb folders to a friend's computer if i dont know the name of his home directory?
– Designer
Dec 2 at 15:42
Runls /home
...
– Panther
Dec 2 at 16:03
The usb mount point is variable. /media is deprecated in many modern OS. Runmount
to find the mount point
– Panther
Dec 2 at 16:05
1
~
is a variable which directly references the current users home directory.
– Panki
Dec 2 at 17:15
1
@Designer This is too broad to automate easily, though it may be done, as per the comments above.
– Tomasz
Dec 2 at 17:21
add a comment |
up vote
0
down vote
up vote
0
down vote
Given your username is Andrew or rather andrew
, it will most likely be mounted under /media/andrew/a_volume_name
. So first you need to get this full path. You can store it in a shell variable to make things easy:
ls /media/andrew
See or find the right entry in the output, and now save it in the source directory variable:
s_dir=/media/andrew/my_usb_drive
Of course replace my_usb_drive
with the right name. Once you have this, enter this command:
cp -r "$s_dir"/theme "$s_dir"/icons /home/andrew/.config
Given your username is Andrew or rather andrew
, it will most likely be mounted under /media/andrew/a_volume_name
. So first you need to get this full path. You can store it in a shell variable to make things easy:
ls /media/andrew
See or find the right entry in the output, and now save it in the source directory variable:
s_dir=/media/andrew/my_usb_drive
Of course replace my_usb_drive
with the right name. Once you have this, enter this command:
cp -r "$s_dir"/theme "$s_dir"/icons /home/andrew/.config
answered Dec 2 at 13:50
Tomasz
9,12052964
9,12052964
Is there any wild card for the usb path? For example how can i copy my usb folders to a friend's computer if i dont know the name of his home directory?
– Designer
Dec 2 at 15:42
Runls /home
...
– Panther
Dec 2 at 16:03
The usb mount point is variable. /media is deprecated in many modern OS. Runmount
to find the mount point
– Panther
Dec 2 at 16:05
1
~
is a variable which directly references the current users home directory.
– Panki
Dec 2 at 17:15
1
@Designer This is too broad to automate easily, though it may be done, as per the comments above.
– Tomasz
Dec 2 at 17:21
add a comment |
Is there any wild card for the usb path? For example how can i copy my usb folders to a friend's computer if i dont know the name of his home directory?
– Designer
Dec 2 at 15:42
Runls /home
...
– Panther
Dec 2 at 16:03
The usb mount point is variable. /media is deprecated in many modern OS. Runmount
to find the mount point
– Panther
Dec 2 at 16:05
1
~
is a variable which directly references the current users home directory.
– Panki
Dec 2 at 17:15
1
@Designer This is too broad to automate easily, though it may be done, as per the comments above.
– Tomasz
Dec 2 at 17:21
Is there any wild card for the usb path? For example how can i copy my usb folders to a friend's computer if i dont know the name of his home directory?
– Designer
Dec 2 at 15:42
Is there any wild card for the usb path? For example how can i copy my usb folders to a friend's computer if i dont know the name of his home directory?
– Designer
Dec 2 at 15:42
Run
ls /home
...– Panther
Dec 2 at 16:03
Run
ls /home
...– Panther
Dec 2 at 16:03
The usb mount point is variable. /media is deprecated in many modern OS. Run
mount
to find the mount point– Panther
Dec 2 at 16:05
The usb mount point is variable. /media is deprecated in many modern OS. Run
mount
to find the mount point– Panther
Dec 2 at 16:05
1
1
~
is a variable which directly references the current users home directory.– Panki
Dec 2 at 17:15
~
is a variable which directly references the current users home directory.– Panki
Dec 2 at 17:15
1
1
@Designer This is too broad to automate easily, though it may be done, as per the comments above.
– Tomasz
Dec 2 at 17:21
@Designer This is too broad to automate easily, though it may be done, as per the comments above.
– Tomasz
Dec 2 at 17:21
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f485485%2fhow-can-i-copy-files-from-any-usb-stick-to-users-home-directory-using-terminal%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
If it's just a one-time copy, running
cp -r src-dir dest-dir
should be sufficient. Are you looking for something more advanced?– Haxiel
Dec 2 at 13:47