Questions tagged [unix]

Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs.

Filter by
Sorted by
Tagged with
0 votes
1 answer
144 views

Cannot remove a symlink recursive

During a delete of a backup, somehow the rm -rf got stock and couldn't delete a symlink. Now, my folder looks like that: $ ls armips-master # folder $ cd armips-master $ ls armips $ readlink ./armips ...
Sisyffe's user avatar
  • 11
1 vote
1 answer
2k views

How to send and receive an UNIX datagram with socat?

I need to send a UNIX datagram to an open port in a running application with socat. When the application receives the datagram, it will answer back with another. I need to do this to get the resulting ...
Pablomagno's user avatar
0 votes
1 answer
95 views

Continuous Open-File-Handle Monitoring in Unix

In Unix do you know of a way to do continuous open-file-handle monitoring? I know of lsof, which has a maximum sampling rate of 1s. However, I'm looking to do the exact same thing except continuously, ...
user2279952's user avatar
0 votes
1 answer
21 views

Can anyone assist me with this script?

I'm having trouble with having the following command options -s and -f display what I need them to. The parameters are being recognized fine. #!/bin/bash defaultPath="/etc/passwd" ...
Eikan1126's user avatar
0 votes
1 answer
618 views

UNIX or Linux sort: only sort on the first part of an entry

I'm working on a complicated grep, something like grep -E -i "first|next" *.txt, and I get results like: logs.10.txt:2022-10-07 10:33:05.6673 | ClassName | [Info] | Inside function first(), ...
Dominique's user avatar
  • 2,183
0 votes
1 answer
45 views

file system permissions for samba share

I have an issue with file system permissions when using samba on my raspi. It worked previously, then it stopped working. I suspect something with the file system. It is about the folder /media/usb/...
Klaus Breyer's user avatar
0 votes
0 answers
129 views

No BIOS boot options

Today out of the blue, I encountered the following problem: whenever I turn on the pc, it goes directly to the BIOS instead of opening GRUB. The problem is that it doesn't show any drive in the boot ...
Federico Fusco's user avatar
0 votes
1 answer
31 views

Is it defined to use pax across filesystems?

If I wanted to backup a *nx system, am I correct that going across filesystem boundaries would be a no-no? Would utilities like pax properly handle the jump across them or do I avoid it? If avoid it,...
Adrian's user avatar
  • 602
-1 votes
1 answer
526 views

Getting “scp: Target is not a directory” when trying to upload files from desktop to a remote Unix directory

I’m trying to upload a file from my desktop to directory2/ on my university's Unix server. I tried doing this: scp /Macintosh HD/Users/myname/Desktop/filename.c [email protected]:/directory1/...
samsam's user avatar
  • 1
1 vote
0 answers
536 views

How to mount NAS volume via. Terminal /command line without additional prompts on OSX

I remotely manage a Mac Mini at home when I am away. We also have a Synology NAS that I use for various additional storage and backups. Sometimes, if there is WiFi or internet issues, the Mac Mini ...
SkRevo's user avatar
  • 11
0 votes
1 answer
114 views

Output to stdout and external txt file

I am trying to redirect the stdout of a particular output to a txt file, however I would still like to view it in the console log tail -f /var/log/kern.log | ./prsfwlog -f elfs/prs_log.elf | \ grep -E ...
Nir's user avatar
  • 1
1 vote
0 answers
230 views

Attempts to Zip files by date not working as expected

I am trying to zip up a bunch of files, but only those created on a certain date. I'm trying to use the -t option, but it's not finding the files that I can clearly see are there. This is a sample of ...
bk_32's user avatar
  • 123
-1 votes
1 answer
591 views

Recover data from broken wd hard disk by replacing the head

I have a broken wd hard disk, see this link for the detail status: How to use dd to backup "WD My Passport" on Ubuntu Because it is not allowed to ask more than one question in the same post,...
stackbiz's user avatar
  • 123
0 votes
1 answer
134 views

how to make Google Drive put files in old directory (~/Google Drive/) instead of new directory (~/Google Drive/My Drive/)

Background I am using Google Drive for Desktop on two Mac laptops. Both are running "Catalina" (MacOS 10.15). I would like to be able to sync between them and have the filepaths be the same ...
Alex Roberts's user avatar
0 votes
1 answer
363 views

How to use dd to backup "WD My Passport" on Ubuntu

My "WD My Passport" has problem when connecting to Windows 10, it may have hardware error. I have set a password for the "WD My Passport" with WD Security long time ago. Windows ...
stackbiz's user avatar
  • 123
1 vote
2 answers
2k views

Cannot boot Qubes after successful installation

There is a problem with booting Qubes 4.1.1 after installation marked by installer as successful. The validity of the image is confirmed and hardware requirements should be passed. SETUP [docs] Intel ...
Pozzi Userpic's user avatar
0 votes
2 answers
1k views

Setting environment variables using eval - by calling other shell script

I have two shell scripts Caller and getGlobalParameters. There is a function defined in the getGlobalParameters script which calls a java class and uses the values returned by the java class to set ...
Sachin khot's user avatar
0 votes
0 answers
177 views

How to encrypt files so that root cannot view them?

I have a powerful linux server with lots of CPU+RAM which sits around idle 99% of the day. I have a friend who has some financial models that he runs on his laptop for 2 hours a day. I want to invite ...
CaptainCodeman's user avatar
2 votes
0 answers
145 views

are page tables under utilized in x86 systems

I was recently looking at the page table architecture in x86 and x86-32 machines. x86-32 paging architecture: x86-64 paging architecture: In x86 for example, we use 10 bits as offset into the page ...
deepak arumugam's user avatar
12 votes
5 answers
10k views

Why a fork is often followed by an exec?

Why "a fork is often followed by an exec"? Can't you just create a new process in UNIX?
alexander.sivak's user avatar
0 votes
0 answers
459 views

How do you download something using wget and the download URL when the web page requires a checkbox ticking?

I want to download some data. On the web page where the download is, there is a box that needs checking to confirm that the terms have been agreed before allowing this download. When I try to download ...
MelParker101's user avatar
0 votes
0 answers
80 views

MD5 File Concatenation

dears, can any one help me on here is an example md5 file which contains several checksums. (between the dashes) You will see that 6 are for files in on subdir and 2 are for files in the directory: ---...
Anas Saleh's user avatar
0 votes
1 answer
173 views

See htop tree evolve in slow-motion

Using htop and its tree view (trigger by t or F5) one can see processes by parenthood, and layout the relations between them as a tree. Is there a way to see how the process tree evolves in slow ...
Michael's user avatar
  • 103
19 votes
1 answer
4k views

How can I tell when FFMPEG is done writing a file?

Given an input video, input.mp4, the following command produces an out folder containing a bunch of HLS video segments and m3u8 playlist files for a number of resolutions: ffmpeg -hide_banner -y -i ...
knpwrs's user avatar
  • 1,403
0 votes
1 answer
640 views

Cannot Connect VNC through SSH to Windows from Unix

I mostly have Unix devices and use VNC through SSH to connect to all of them. However I have one Windows 10 PC and I cannot remote into it. On the Windows 10 PC, I installed TightVNC Server (Version ...
Junto026's user avatar
0 votes
3 answers
5k views

Unix: How to Exit Out of "/" directory?

I am learning some elements of the Unix environment myself. I have tried to search up this question but perhaps I am not wording it correctly. It is quite possibly a very trivial question, too, but I ...
algebroo's user avatar
  • 101
0 votes
0 answers
120 views

How to change permissions for a file in Ubuntu?

I run the file ./schema.pg.sh with the command sudo ./schema.pg.sh in /sql directory. But the terminal throws an error: could not change directory to "/sql": Permission denied Script I am ...
lian. lun's user avatar
0 votes
1 answer
47 views

Sorting the list of subnets as Integers ascending

I have a list of subnets for eg. 180.151.96.0/22 180.151.240.0/21 119.82.112.0/22 203.122.29.0/24 203.122.48.0/22 119.82.92.0/24 180.151.108.0/23 119.82.124.0/24 119.82.89.0/24 180.151.17.0/24 119.82....
ph3ro's user avatar
  • 143
9 votes
1 answer
13k views

Troubleshooting "Connection closed by authenticating user andy 173.63.60.32 port 11706 [preauth]"

As noted in the title, I am having trouble connecting to a remote server through ssh. I am trying to connect a Windows machine to a server running CentOS. I have been using PuTTY on the Windows ...
Phoenix's user avatar
  • 191
1 vote
1 answer
229 views

zsh alias for running the most recent matching history item

I'd like to create an alias in zsh that runs my last terminal command beginning with node. I can run that command with !?node, but I can't create an alias with alias N='!?node'. How can I make this ...
Raffi's user avatar
  • 163
0 votes
2 answers
288 views

Accidentally made an alias for a pre-existing command on OS X

I was toying around with aliases and made an alias to take me to the directory where I store all my bash projects via the cd command. However, I used 'bash' as a name for the alias. Now when I run all ...
Caecilius-rgb's user avatar
0 votes
1 answer
720 views

Inodes in External Disk full. Actually not

Checking inode usage: [cold] > df -ih . Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sdb1 59M 59M 7.9K 100% /home/doom/cold Here we see 100% Inode usage. 59 million inodes ...
Tickler_'s user avatar
0 votes
1 answer
407 views

How to do a recursive filename `find` from the shell using a glob pattern with "set braces"

From the shell, I'd like to recursively search a directory for a given glob pattern. But I want to use set-braces-syntax in my pattern: find ~/path/to/dir -name '*.{h,m}' Here I'd like to recursively ...
Todd Ditchendorf's user avatar
0 votes
1 answer
1k views

How to remove everything between quotation marks in Unix

How do I remove everything between and including single quotes in Unix/Linux? Example: Input : WHERE EnodeB_Fin Date_Time_Fin >= '2022-03-15 00:00:00' Output : WHERE EnodeB_Fin Date_Time_Fin &...
Sam's user avatar
  • 1
0 votes
0 answers
204 views

How to recover a corrupt G.726 audio file?

I have an old audio file in g726 format, which I last opened three computers ago. It appears to be corrupt -- ffmpeg rejects it with Invalid data found when processing input... It is not all zeros, so ...
Mikhail T.'s user avatar
0 votes
1 answer
739 views

unix, vi editor, copy and paste, not pasting first lines

I am performing the below steps. Looks like I am not able to copy and paste into vi editor on unix with #!/bin/ksh as the first line. I pasted the code I need in but I do not see that in first line in ...
user112a2's user avatar
  • 127
0 votes
1 answer
2k views

simple bash script for collecting logs

I'm new with BASH scripting and I need a little help if it's possible. Let's say there's a UNIX server from which I want to gather some simple log events (let's say .txt files). Let's say log events ...
mrk's user avatar
  • 1
2 votes
1 answer
203 views

Does the slave pseudoterminal use the line discipline?

According to this article: the line discipline instance is not evoked when the TTY driver is sending user program output to PTY master and the accompanying diagram. However, according to a different ...
jackmiller's user avatar
0 votes
1 answer
174 views

Removing Duplicate from File

I have two files fileA and fileb FILEA 1.1.1.1 2.2.2.2 3.3.3.3 4.4.4.4 5.5.5.5 FILEB 4.4.4.4 2.2.2.2 Output should be 1.1.1.1 3.3.3.3 5.5.5.5 Size of File A is around 60GB and Size of File B is 1GB ...
ph3ro's user avatar
  • 143
0 votes
1 answer
187 views

Why can't I ping db from a unix machine on windows?

I have a windows machine, with ubuntu on it, where I run docker, in which there is a container I need to connect to db. But the problem is already between windows and ubuntu. If I ping the db from ...
EOTheDev's user avatar
1 vote
3 answers
3k views

UNIX/Linux: What's the file permission number?

When I ask for file permissions on a Windows-10 WSL Ubuntu app, I do: ls -ltra And I get information like: -rwxrwxrwx 1 scampsd scampsd 42034 Mar 29 15:26 Filename.cs drwxrwxrwx 1 scampsd scampsd ...
Dominique's user avatar
  • 2,183
1 vote
1 answer
1k views

IntelliJ quits abruptly in the Apple M1

I use Apple M1 and IntelIJ keeps shut down often when I login into the computer in the morning and I need to restart the app. Also, sometimes the IntelliJ just freezes and I need to force quit to ...
Arefe's user avatar
  • 505
0 votes
0 answers
108 views

Execute a program with a sequential list of files

I have a list of files with titles like the following: file_0.10_180.0degrees.txt file_0.15_180.0degrees.txt file_0.20_180.0degrees.txt file_0.25_180.0degrees.txt where the files can be passed in as ...
ConfusedStudent's user avatar
0 votes
1 answer
358 views

How to compress the main folder which includes certain sub folder using tar

Assume we have a folder structure as below main_folder - sub_folder1 - sub_folder2 - sub_folder3 - valid_folder1 - valid_folder2 - junk_folder1 - junk_folder2 ...
Malaiselvan's user avatar
0 votes
1 answer
365 views

Equivalent of /dev/full on OSX

I want some special file which throws an error when I write to it. /dev/full does that on Linux. I don't care too much about the specific error.
Albert's user avatar
  • 6,661
4 votes
3 answers
4k views

BeyondCompare doesn't ignore difference in line endings (DOS/UNIX)

I am using BeyondCompare 4 on Windows 10 to compare two directories with thousands of files. They are the basically same, but one exported from Windows, and another one from Linux. The only difference ...
Gonçalo Peres's user avatar
1 vote
1 answer
2k views

How to forward a remote UNIX_AF socket to a local port with ssh

I'm trying to forward a remote UNIX_AF socket to a local port through ssh, but it fails with the message: Warning: remote port forwarding failed for listen path /path/to/sock I tried to run ssh user@...
yoursred's user avatar
0 votes
1 answer
1k views

Change the ownership of all files & folders based on search result

I know how to find all the files & folders owned by a specific user, say tommy: find / -user tommy But how can I chown the files & folders to another user, say peter? I know I can change ...
Raptor's user avatar
  • 1,090
1 vote
1 answer
178 views

Where is my PATH?

When I run the following command, I see several paths and all looks well. echo $PATH However, I want to find out where these paths are stored. I have looked for ~/.bash_profile and ~/.zshrc but they ...
bobby123uk's user avatar
1 vote
2 answers
3k views

Postgresql unix domain socket with password authentication

It looks like postgresql supports either of the below Use tcp (i.e. localhost:5432) with password authentication Use Unix domain scoket (i.e /var/run/postgresql/.s.PGSQL.5432 ) with peer/trust ...
balki's user avatar
  • 127

1
2
3 4 5
80