DORSETRIGS
Home

unix (116 post)


posts by category not found!

Change the "From:" address in Unix "mail"

Changing the From Address in Unix mail When working with email in a Unix environment one common requirement is to modify the From address in outgoing emails sen

3 min read 09-10-2024 41
Change the "From:" address in Unix "mail"
Change the "From:" address in Unix "mail"

Command-line Unix ASCII-based charting / plotting tool

Command line Unix ASCII Based Charting and Plotting Tool Understanding the Problem When it comes to data visualization many users rely on graphical user interfa

3 min read 09-10-2024 49
Command-line Unix ASCII-based charting / plotting tool
Command-line Unix ASCII-based charting / plotting tool

execv() and const-ness

Understanding execv and Const ness in C In the world of C programming system calls play a crucial role in process management One such system call is execv which

2 min read 09-10-2024 54
execv() and const-ness
execv() and const-ness

How to get the current directory in a C program?

How to Get the Current Directory in a C Program In C programming managing file paths and directories is an essential skill particularly when your application ne

3 min read 09-10-2024 68
How to get the current directory in a C program?
How to get the current directory in a C program?

Get list of static libraries used in an executable

How to Retrieve the List of Static Libraries Used in an Executable When developing software especially in languages like C or C its common to link your program

2 min read 09-10-2024 72
Get list of static libraries used in an executable
Get list of static libraries used in an executable

Replace \n with \r\n in Unix file

How to Replace n with r n in Unix Files In the world of text file manipulation dealing with newline characters can be a common yet challenging task especially f

3 min read 09-10-2024 47
Replace \n with \r\n in Unix file
Replace \n with \r\n in Unix file

How do I create an array in Unix shell scripting?

How to Create an Array in Unix Shell Scripting Unix shell scripting is a powerful way to automate tasks and manage system operations One fundamental concept in

2 min read 09-10-2024 49
How do I create an array in Unix shell scripting?
How do I create an array in Unix shell scripting?

How does getaddrinfo() do DNS lookup?

Understanding How getaddrinfo Performs DNS Lookup Introduction to the Problem When developing network applications one common requirement is to convert human re

3 min read 08-10-2024 70
How does getaddrinfo() do DNS lookup?
How does getaddrinfo() do DNS lookup?

Generate sha256 with OpenSSL and C++

How to Generate SHA 256 Hash with Open SSL and C In today s digital age data integrity and security are of utmost importance One of the widely used methods to e

3 min read 08-10-2024 45
Generate sha256 with OpenSSL and C++
Generate sha256 with OpenSSL and C++

shell script: search and replace over multiple lines

Efficient Multi line Search and Replace in Shell Scripts When working with shell scripts one common task is the need to search and replace text across multiple

3 min read 08-10-2024 56
shell script: search and replace over multiple lines
shell script: search and replace over multiple lines

check duration of audio files on the command-line

How to Check the Duration of Audio Files Using Command Line Tools In our fast paced digital world managing audio files efficiently is essential for creators edi

3 min read 08-10-2024 53
check duration of audio files on the command-line
check duration of audio files on the command-line

How to check if a file is empty in Bash?

How to Check if a File is Empty in Bash When working with files in Bash it is often necessary to determine whether a file is empty or contains data This simple

2 min read 08-10-2024 53
How to check if a file is empty in Bash?
How to check if a file is empty in Bash?

How to display only different rows using diff (bash)

How to Display Only Different Rows Using diff in Bash When working with files in the command line you may encounter situations where you need to compare two fil

2 min read 08-10-2024 45
How to display only different rows using diff (bash)
How to display only different rows using diff (bash)

How to delete all files in a folder, but not delete the folder using NIX standard libraries?

How to Delete All Files in a Folder Using NIX Standard Libraries Without Deleting the Folder Deleting files from a directory is a common task in programming and

3 min read 08-10-2024 45
How to delete all files in a folder, but not delete the folder using NIX standard libraries?
How to delete all files in a folder, but not delete the folder using NIX standard libraries?

How can I set the last modified time of a file from python?

How to Set the Last Modified Time of a File in Python When working with files in Python you may come across a situation where you need to update the last modifi

3 min read 08-10-2024 38
How can I set the last modified time of a file from python?
How can I set the last modified time of a file from python?

Store st_mode (from stat) in a file and reuse it in chmod

Storing and Reusing st mode from stat for chmod In the world of Unix like operating systems managing file permissions efficiently is crucial for system security

3 min read 08-10-2024 54
Store st_mode (from stat) in a file and reuse it in chmod
Store st_mode (from stat) in a file and reuse it in chmod

Display two files side by side

How to Display Two Files Side by Side in Your Development Environment In programming and data analysis it s common to need a side by side view of two files This

2 min read 08-10-2024 48
Display two files side by side
Display two files side by side

if statement to check $HOSTNAME in shell script

Understanding the Use of If Statements to Check HOSTNAME in Shell Scripts When working with shell scripts one common requirement is to perform actions based on

3 min read 07-10-2024 44
if statement to check $HOSTNAME in shell script
if statement to check $HOSTNAME in shell script

Forking vs Threading

Understanding Forking vs Threading A Comprehensive Guide In the realm of programming and operating systems developers often face the critical decision of how to

3 min read 07-10-2024 44
Forking vs Threading
Forking vs Threading

how to diff and show only exact differences for 2 long string

How to Diff and Show Only Exact Differences for Two Long Strings When working with large strings in programming especially when comparing two long pieces of tex

2 min read 07-10-2024 38
how to diff and show only exact differences for 2 long string
how to diff and show only exact differences for 2 long string

Kill a process and wait for the process to exit

How to Kill a Process and Wait for It to Exit A Comprehensive Guide In the world of computing managing processes efficiently is crucial for maintaining optimal

3 min read 07-10-2024 62
Kill a process and wait for the process to exit
Kill a process and wait for the process to exit

How can I check the first character in a string in Bash or Unix shell?

How to Check the First Character of a String in Bash or Unix Shell When working with strings in Bash or Unix shell scripting its often necessary to inspect the

2 min read 07-10-2024 54
How can I check the first character in a string in Bash or Unix shell?
How can I check the first character in a string in Bash or Unix shell?

Is there a way to look for a flag in a man page?

Finding Your Flag Navigating Man Pages with Ease Ever felt lost in the vast sea of options a command offers Trying to find that specific flag you need in a dens

2 min read 07-10-2024 37
Is there a way to look for a flag in a man page?
Is there a way to look for a flag in a man page?

Meaning that is displayed by [alternatives --config mta] is what?

Understanding the Output of alternatives config mta Problem You re trying to understand the output of the command alternatives config mta and what it means Simp

2 min read 07-10-2024 44
Meaning that is displayed by [alternatives --config mta] is what?
Meaning that is displayed by [alternatives --config mta] is what?

cp: missing destination file operand after

cp missing destination file operand after A Common Linux Command Error and How to Fix It Have you ever encountered the dreaded cp missing destination file opera

less than a minute read 07-10-2024 42
cp: missing destination file operand after
cp: missing destination file operand after