Объединить файлы в Linux

Содержание
Introduction
cat
echo
Объединить .pdf файлы

Introduction

О там какие в Linux бывают файлы и что помимо объединения с ними можно делать читайте в статье «Файлы в Linux»

Объединение файлов

Файлы в Linux можно объединять разными способами. В этой статье вы узнаете как это сделать с помощью команд cat и echo

cat

Для объединения файла one с файлом two достаточно выполнить

cat one two

Объединить можно сразу несклько файлов.

Рассмотрим три файла one , two , three следующего содержания

one

Cool bookstore: Book24

two

Best hotels: Booking.com

three

Official Samsung Store: Samsung

Объединим их и проверим результат - он появится в консоли как и в случае двух файлов

cat one two three

Cool bookstore: Book24
Best hotels: Booking.com
Official Samsung Store: Samsung

Теперь объединим файлы в один новый файл big

cat one two three > big
vi big

Cool bookstore: Book24 Best hotels: Booking.com Official Samsung Store: Samsung

К новому файлу big мы можем дописать в конец файл one

cat big one

Cool bookstore: Book24
Best hotels: Booking.com
Official Samsung Store: Samsung
Cool bookstore: Book24

echo

Файл two можно записаь в конец файла one

echo $(<two) >> one

Объединение .pdf файлов

Этот раздел вынесен в отдельную статью

«Объединение .pdf файлов»

Article author: Andrei Olegovich

Похожие статьи
Linux
Debian
Ubuntu
CentOS
Rocky
Bash
Network Configuration
Files
Examine Free Disk Space
Combine .pdf Files
diff: Compare Files
find: Search for Files
kill: Finish Process
rename
make
signal: System Signals
env: Environmental Variables
localectl: langugae
systemctl: List of Active Services
Firewall
SCP: File Exchange
SSH: Remote Access
cron: Tasks in Timetable
sudo
Monitoring
C
C++

Search this site

Subscribe to Telegram channel @aofeed to follow new articles and updates to old ones

Go to channel

@aofeed

Ask a question in the Telegram group

@aofeedchat

Contacts and cooperation:
I recommend our hosting beget.com
Write to info@aredel.com if you:
1. Want to write an article for our site or translate an article into your native language.
2. Want to place thematically relevant ads on the site.
3. Ads on my site pass maximum censorship. If you see an ad block unsuitable for school-age children, shocking or misleading - please contact us by e-mail
4. Found a mistake, inaccuracy, bug, etc. on the site. ... .......
5. Articles can be shared on social media by clicking a network icon: