Page is a Work in progress
The purpose of this page is to reflect all useful commands I have come across and have used as a one off or has become a staple.
Copying one file into many files
At one point I had to replace 600 symbolic links which all had the same contents of one file but it was 600 unique filenames. First command tee.
What does tee do?
How its used. Lets say you have a file called test.txt and you need to make 10 copies.
tee <test.txt test{01..10}.txt >/dev/null ls -al -rw-rw-r--. 1 testuser testuser 6 Oct 8 14:48 test01.txt -rw-rw-r--. 1 testuser testuser 6 Oct 8 14:48 test02.txt -rw-rw-r--. 1 testuser testuser 6 Oct 8 14:48 test03.txt -rw-rw-r--. 1 testuser testuser 6 Oct 8 14:48 test04.txt -rw-rw-r--. 1 testuser testuser 6 Oct 8 14:48 test05.txt -rw-rw-r--. 1 testuser testuser 6 Oct 8 14:48 test06.txt -rw-rw-r--. 1 testuser testuser 6 Oct 8 14:48 test07.txt -rw-rw-r--. 1 testuser testuser 6 Oct 8 14:48 test08.txt -rw-rw-r--. 1 testuser testuser 6 Oct 8 14:48 test09.txt -rw-rw-r--. 1 testuser testuser 6 Oct 8 14:48 test10.txt -rw-rw-r--. 1 testuser testuser 6 Oct 8 14:48 test.txt
Now that the files are made, its time to rename every single file but how?
...