unix Questions
3
I'm currently interesting in UNIX system.
For IPC(Interprocess Communication), UNIX uses a file named socket. I understand it works like server-client model, write-end and read-end uses socket file...
Clyde asked 20/3, 2022 at 6:38
2
Solved
I just need to append the string "eng" to many files names in same directory without changing its extension in MAC TERMINAL. I searched it for long time, i found mv command to rename files at once....
Homeric asked 19/6, 2014 at 8:14
4
Solved
I need to change the order of a string in AIX, but with the command cut I can't do it
Ex:
echo FT0215202301.xml | cut -b 7-10,5-6,3-4
Result:
02152023
Expected:
20230215
4
Note:Overwriting of the symlinks occurs from tar version 1.27 or higher
Below I am trying to show what exactly the problem is.
contents of the dirtmp1
file1.txt
file2.txt
code to create the ab...
5
Solved
Is there any way to rename a file while keeping the original creation / modification/ read time?
This is in Solaris.
Thanks in advance.
Gamester asked 21/6, 2011 at 8:24
4
Solved
Ok so I am writing a shell script to delete a directory but only if there are no files inside.
what I want to do is have an if statement that will check if there are files in the directory and if ...
9
Solved
I have a program that saves many large files >1GB using fwrite It works fine, but unfortunately due to the nature of the data each call to fwrite only writes 1-4bytes. with the result that the writ...
Chiastic asked 27/11, 2012 at 16:7
4
for parentDir in *
do
cd "$parentDir"
for subDir in *
do
cd "$subDir"
for file in *.*
do
convert "$file" -crop 120x95 summary_"$file"
convert "$file" -crop 160x225 detail_"$file"
done
mkd...
Yun asked 24/10, 2016 at 18:8
5
Solved
When working in Unix with various programming languages I often use Kate as my primary editor.
It has a really nice function of being able to open a built-in terminal window which is quite useful. ...
Scatter asked 23/11, 2009 at 12:37
4
Solved
I have a very large file, over 100GB (many billions of lines), and I would like to conduct a two-level sort as quick as possible on a Unix system with limited memory. This will be one step in a lar...
8
Solved
I have pattern like below
hi
hello
hallo
greetings
salutations
no more hello for you
I am trying to replace all newlines with tab using the following command
sed -e "s_/\n_/\t_g"
but it's not...
5
Solved
I am fairly new to running scripts in UNIX/Linux. I have a .env file containing environment information and a .sh script containing folder creations etc for that environment.
How would I run the s...
4
Solved
I found the text browser w3m which is the best so far in my opinion.
However, it is main problem is Javascript.
I cannot see comments at all in Stackoverflow when I use it.
I am not sure what is ...
Leomaleon asked 19/4, 2009 at 1:27
11
I need to find the OS name and version on a Unix/Linux platform. For this I tried the following:
lsb_release utility
/etc/redhat-release or specific file
But it does not seem to be the best sol...
Supplejack asked 18/11, 2014 at 6:48
8
Is there a convention for documenting shell scripts' parameters?
For example:
#!/usr/bin/env bash
# <description>
#
# Usage:
# $ ./myScript param1 [param2]
# * param1: <description>
...
3
Solved
The following screen appears when run [alternatives --config mta].
There are 2 programs which provide 'mta'.
Selection Command
-----------------------------------------------
+ 1 /usr/sbin/sendm...
Helminth asked 10/10, 2013 at 3:12
5
Im trying to do a full back up and copy over all files from one directory into another directory
#!/bin/bash
#getting files from this directory
PROJECTDIRECTORY=/../../Project3
#Copi...
6
Solved
How can I display only different rows using diff in a separate file?
For example, the file number 1 contains the line:
1;john;125;3
1;tom;56;2
2;jack;10;5
A file number 2 contains the following...
4
Solved
So I want to set some paths differently depending on the host, but unfortunately it's not working. Here is my script:
if [$HOSTNAME == "foo"]; then
echo "success"
else
echo "failure"
fi
This i...
20
Solved
I need to check the duration of a group of audio files.
Is there a simple way to do this on the unix command-line?
> duration *
I have the amazing SoX app which has an option called stats tha...
4
When I start my tcp server from my bash script, I need to kill the previous instance (which may still be listening to the same port) right before the current instance starts listening.
I could us...
Hanzelin asked 27/7, 2013 at 5:48
4
Solved
We have a shell script which is run by CRON. The shell script in turn runs a python script which downloads files from an FTP server and then runs a java log processor on those files. The process ru...
11
Solved
I'm looking to create a hash with sha256 using openssl and C++. I know there's a similar post at Generate SHA hash in C++ using OpenSSL library, but I'm looking to specifically create sha256.
UPDA...
9
Solved
I'm trying to do the opposite of this question, replacing Unix line endings with Windows line endings, so that I can use SQL Server bcp over samba to import the file. I have sed installed but not d...
Prearrange asked 5/10, 2009 at 18:30
9
Solved
How do I remove the first 5 characters in each line in a text file?
I have a file like this:
4 Alabama
4 Alaska
4 Arizona
4 Arkansas
4 California
54 Can
8 Carolina
4 Colorado
4 Connectic...
1 Next >
© 2022 - 2025 — McMap. All rights reserved.