Friday, 25 March 2011
Copying a file to all subdirectories in Linux
You might sometimes need to copy a single file to all the subdirectories and this can be easily achieved with linux terminal by simply using some commands.
Below is how I copied password.txt file to all the subdirectories inside the Moviez directory from terminal.
Isn't it simple? And it will surely come handy sometimes. Have fun. :)
Below is how I copied password.txt file to all the subdirectories inside the Moviez directory from terminal.
find /samar/Moviez -type d -exec cp -i /samar/Readme/password.txt {} \;
Isn't it simple? And it will surely come handy sometimes. Have fun. :)
Labels:
linux,
tricks and tips,
ubuntu
Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget |
Copying a file to all subdirectories in Linux
2011-03-25T23:28:00+05:45
Cool Samar
linux|tricks and tips|ubuntu|
Subscribe to:
Post Comments (Atom)