Frage

I am using uuencode as below

uuencode /root/some/directory/**Test.txt** /root/some/directory/**Test.txt** | mail -s 'test' xyz@mail.com

The above command is working as expected but while the mail comes to the inbox of xyz@mail.com the file name changes to rootsomedirectoryTest.txt but the actual file name is Test.txt

Filename remains same when i trigger this command from the directory where the file is. above command adds path to the file name, but i need the orignal file name to be sent.

Could someone help please?

War es hilfreich?

Lösung

Just use

uencode /root/some/directory/Test.txt Test.txt | mail -s 'test' xyz@mail.com

Andere Tipps

Do the work in the directory where the file lives, and don't specify the full pathame:

cd /root/some/directory
uuencode Test.txt Test.txt | mail -s 'test' xyz@mail.com
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top