Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

Sending Environment Variables via SCP

I'm looking to send some kind of environment variable using "SCP -o" (or any other file transfer protocol for that matter PSFTP, PSCP, etc). I currently use SCP to transfer files between ...
horsman's user avatar
0 votes
0 answers
13 views

"find" command does not find all files from root unless folder is specified [duplicate]

I am trying to find the files that are named setenv.sh on this machine, I am logged in as root and am searching from the '/' using the following syntax and receiving the output: # First [root@...
user1917670's user avatar
0 votes
1 answer
127 views

How do I find files by last day in a month? (or how to copy the latest file per month)

I know there is "find" and I use something like find "/backup.stats/30days" -mtime +30 -type f But I wanted to know if anyone knew of a way to pick out the oldest file by month; ...
RansuDoragon's user avatar
1 vote
0 answers
66 views

How to let root use sudoedit as if it was a user?

I'm writing a wrapper for myself around vim that detects when the user's trying to edit a file that doesn't belong to them, and suggests sudoedit or visudo instead. I want to use sudoedit rather than ...
aaaalz's user avatar
  • 11
1 vote
0 answers
56 views

How to detox filenames in a bash script with no errors posted?

OS: Kubuntu 22.04.4 LTS x86_64 detox 1.4.5 To display above: neofetch --stdout |grep 'OS:' detox -V Here is a toxic filename, starts with s1: s1 Ä Ö Ü - ä ö ü Science & < > " 1 \ 2 ⁄ 3 ...
joseph22's user avatar
  • 367
2 votes
1 answer
51 views

How can I use the last changed file as an argument in linux?

I'm thinking of using the last changed file as an argument to commands like ls, echo, or cat, is there a simple and efficient way? this question arose when I was faced with analyzing the latest log ...
Ilgar's user avatar
  • 21
3 votes
1 answer
613 views

What is the meaning of the manage-gids parameter in /etc/nfs.conf?

I have run into an issue (on a system which I am not root) where there is a directory using an acl to manage access, I should be allowed access (and I am allowed access if I do a newgrp to one of the ...
lagnut's user avatar
  • 33
1 vote
1 answer
224 views

Is there a trick to add an unix user with '@' inside its login on debian

On Debian, there is not a lot of limitations to add an unix user. Ie: the login may contain dots and uppercase letters. Is there a trick to add an unix user with an '@' inside its login ? I understand ...
benelux's user avatar
  • 13
1 vote
1 answer
327 views

Shell command to tar directory excluding certain folders

In Bash 4, I want make a tar.gz with excluded folders, and while tons of answers about this simple case exist, nothing works in my case. I would like to keep the directory mentioned in exclude, ...
VOX's user avatar
  • 13
0 votes
0 answers
121 views

what does ARG_MAX mean when I run a script?

Up to now I know what ARG_MAX means (thanks to EdMorton): ls foo bar The command is ls and it has three arguments: foo, and bar. It's 7 characters, so the arguments of ls in here is 7. Now let's ...
Saeed's user avatar
  • 423
0 votes
1 answer
860 views

tail -f nohup.out gives cannot open 'nohup.out' for reading: No such file or directory

I connected to a remote server using ssh protocol and launched this command in order to run my python script remotely: nohup python3.8 -u sab.py > log_15_09_2023.txt & This works fine since if ...
tail's user avatar
  • 111
0 votes
0 answers
70 views

Unable to add DNS into the ignore host Network Proxy Preferences Linux

I have internal DNS ( let say it example.com ), I’m unable to add this DNS into the ignore host Network Proxy Preferences, due to the Amazon Linux AWS workspaces key not writable. As a result, not ...
chamara's user avatar
0 votes
1 answer
326 views

Connection refused PuTTY to VMWare workstation guest Rocky Linux

I have Windows 10 Pro, in which VMWare Workstation 16 is installed. The guest system I use there is Rocky Linux 8.8. The problem I’m getting Connection refused PuTTY to VMWare workstation guest OS ...
kanchana disanayaka's user avatar
0 votes
1 answer
2k views

Unix: zip folder ignoring folder structure and excluding a subdirectory

I want to create a zip ignoring the folder structure, and excluding the content of a specific subfolder. I have tried: zip -rj /path/to/target.zip /path/to/source -x "/path/to/source/subfolder/*&...
Alessandro C's user avatar
0 votes
1 answer
341 views

Why UNIX socket files end with and equal sign in ls?

When I list (ls) files in directory, I see the equal sign = after some files. All these files in my case are UNIX domain socket files: user@Debian11:~/src/unix_sock$ l a.out* cli_stream* ...
NK-cell's user avatar
  • 195
0 votes
2 answers
48 views

Does the unix words file change over time or between systems? [closed]

Is the Unix "words" file (e.g at /usr/share/dict/words) pretty standard? I.e, can I generally rely on, for example, the 200th word in the file to be the same word between a fedora and an ...
Him's user avatar
  • 365
0 votes
1 answer
3k views

SSH to AWS EC2 instance hangs

I was able to log in to my ec2 instance via ssh few days ago. But somehow today when I connected it with ssh -i something.pem ubuntu@ip_address -v then the terminal hung on this line: debug1: Local ...
zxcisnoias's user avatar
0 votes
0 answers
94 views

Problem while trying to create a new virtual machine

I am trying to install a virtual machine in my computer, I have windows 10. I installed virtual box and I created a new machine, when I try to start the machine, it says : unpacking failed: write ...
user avatar
1 vote
1 answer
983 views

Unix/Linux "shutdown": How to prevent wall message and terminal blocking?

I'm making a script that adds a layer of functionality on top of the shutdown command. It's intended to schedule a shutdown a while into the future, and sends out it's own wall message. How do I ...
user avatar
0 votes
0 answers
110 views

Why are not all my files included when I gzip a directory?

I know this is a question that has been asked before, for example here Recursively count all the files in a directory, but this is driving me crazy. Let me explain: I have a directory called "...
Mathias's user avatar
  • 101
0 votes
1 answer
775 views

setfacl: How to give user permission to a dir for existing and future files?

OS: debian:bullseye (docker image). What I am trying to do: I have a websockets server that creates a unix socket and listens on it. I am trying to set up nginx in front of this. I am trying to set up ...
agnivesh's user avatar
0 votes
0 answers
109 views

Batch file using WinSCP won't execute UNIX shell script that assigns variables to output of "more" command

I am working with a Batch script that uses WinSCP to transfer files from an UNIX machine to a windows machine. To achieve this, WinSCP has to call shell scripts on the UNIX side. There is one shell ...
Tony E's user avatar
  • 1
0 votes
1 answer
294 views

Need to iterate Backwards in a linux/unix path

I have a script that would have multiple paths (folder names). Each folder path would have a Dockerfile, but its uncertain at what level that file would exist. Lets say my path is "v1/airflow/1....
Mohammed Ali's user avatar
4 votes
0 answers
2k views

Understanding MCE errors on Linux

I got an MCE hardware error on Linux. I used rasdaemon to log all errors. Here is what ras-mc-ctl --errors prints me 41 2023-01-03 10:50:51 +0100 error: Corrected error, no action required., CPU 2, ...
Jakub's user avatar
  • 41
1 vote
1 answer
34 views

Linux, centos, resetting password

While resetting password after commands: rd.break mount -o remount,rw /sysroot chroot /sysroot I entered new password all done correctly at the end created file reliably using touch /.autorelable ...
Mohamed Ramadan's user avatar
0 votes
1 answer
54 views

vim create a binding so that pressing "Shift I I" writes python import statements

I want to create a binding so that pressing "Shift I I" writes python import statements. I think it should be a map, like this: :map <S-i><S-i> ... I'm not sure how to map my ...
kilojoules's user avatar
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
742 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,281
0 votes
1 answer
35 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
  • 612
0 votes
1 answer
131 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 votes
1 answer
715 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
408 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
3k 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
204 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
157 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
0 votes
0 answers
90 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
3 answers
8k 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
148 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
50 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
15k 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
0 votes
1 answer
803 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
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
233 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
217 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
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,281
0 votes
1 answer
391 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
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
2k 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
0 votes
0 answers
1k views

How can directories have only 1 hard link?

When doing ls -al, the second column (just after the permissions) is the number of hard links. For files, I find this clear. My problem is with directories. I read that it is not possible to create ...
Iyán's user avatar
  • 1

1
2 3 4 5
30