Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
12 views

Can I undo a `sudo chown -R /` on Mojave? [duplicate]

I ran a command that ended up executing as sudo chown -R / Can I revert / to default permissions?
0
votes
2answers
36 views

Average of multiple numbers - Shell script

I have created a script which views a logfile and greps for a specific amount of milliseconds / seconds. I have created something which views the minimum and maximum value however I need to find the ...
0
votes
0answers
47 views

FFmpeg cannot be compiled, syntax error when running “make”

My sysad downloaded FFmpeg 4.0.3, and I am trying to build it from source. The configure script runs successfully. The 'make" command fails with this error: [/myhome/ffmpeg]$ make `./ffbuild/...
0
votes
1answer
12 views

mmv rename .pdf file in .odt

I currently have a small problem I would like to convert my .pdf files into .odt files for this I use mmv a program for Linux. I use the following command to convert all *.pdf files to *.odt files: ...
0
votes
2answers
28 views

Extract .tar.gz files in different subdirectories

i have phenological data of different tree species, but they are saved by the bigger Treegroup. The output of find . -name *.tar.gzis: ./Tilia/PEP725_DE_129_070.tar.gz ./Tilia/PEP725_DE_129_071.tar....
0
votes
1answer
31 views

Delete row with empty line csv

1 1479870 5022248660 1 1911574 3015889020 8 1 1569783 5029193930 Output should be 1 1911574 3015889020 8 I used awk '$4!=""' number.csv but it didn't work. Can anyone give me a clue?
0
votes
1answer
36 views

Luks encryption block name format

After disk encryption with LUKS I have chacked my disk with lsblk and found the bellow output. Here the luks id luks-95a00a58-7a6f-429a-a45f-02308d9b1b28 is not familiar to me . What is the meaning ...
0
votes
1answer
21 views

Sudoers Command

I can't understand the difference in this two command's USER ALL=(ALL) NOPASSWD: ALL AND USER ALL=(OTHERUSER) NOPASSWD: ALL Can anyone explain the () change? Thanks
0
votes
1answer
17 views

less +F but tracking file by name, not inode

I'm looking at log file but it's renamed (logs rotation mechanism). How do I see actual logging file in less-like fashion, so I can stop updating for a while and then continue?
0
votes
1answer
25 views

How to check whether my script ran successfully in crontab

I am new to Unix and I need some help to know how to check whether my script has picked by crontab and ran as per schedule (not manually).
-2
votes
0answers
5 views

Get a sorted list of all group ownerships and ACL entries in Unix

I need an efficient way to produce a list of all Unix file Group ownerships and ACL entries sorted by Group. This is to produce a report on what file ownerships and access each group has.
0
votes
0answers
37 views

Cisco AnyConnect VPN client keeps disconnecting on UNIX systems (Windows works)

I have a strange problem with Cisco AnyConnect VPN client using my MacOS 10.14.1 on my home network. When I connect through it to desired network, it disconnect after few seconds. I am not able to ...
2
votes
1answer
120 views

Why does ls wrap some filenames in single quotes?

I've noticed that when I do ls in a terminal, some filenames are wrapped in single quotes and some aren't. I don't like the way this looks as I prefer my terminal outputs to be nice and uniform. ...
0
votes
1answer
29 views

How to sort an ls-like file list?

How do I sort by the last column a list which looks like this: drwxr-sr-x 2 user group 4096 2018-02-19 14:11:42 /something/project/somefile drwxr-sr-x 2 user group ...
0
votes
0answers
19 views

how to copy public key using ssh-copy-id silently

I am copying my public key to another machine using ssh-copy-id. $ sudo ssh-copy-id -i /home/vagrant/.ssh/id_rsa.pub vagrant@datanode1.com /bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/...
0
votes
0answers
36 views

Chmod doesn't change permissions

I have a file named replace.txt with 777 permissions. when running the command: chmod 755 replace.txt the permissions don't change accordingly. I checked with the ls -l command and it still shows ...
0
votes
0answers
87 views

Ubuntu : Folder permission Denied

I have created a folder named 'sample' using sudo mkdir sample . After that i have changed file ownership and added to www-data group using sudo chown ubuntu:www-data -R * then changed permissions ...
28
votes
3answers
8k views

What is a Matrox GPU and why does my university's UNIX server have one?

I was interested in the specs of the UNIX server my university provides for students, so I ran screenfetch. Here's the output: user@unix4.university.edu ...
0
votes
2answers
72 views

Accidentally Restored LUKS Header on Regular Filesystem

I am in really big trouble right now, so a VERY quick solution would be much appreciated. I was in an SSH session on my laptop that has LUKS encryption, and I thought I was restoring its header. But I ...
0
votes
2answers
66 views

How to pipe output of command to another command while also displaying it on the console?

I want to write part of the results of a stream to a file, but I want the entire contents of the stream printed to the console. Is there some command that would help with this? Minimal example: Say ...
0
votes
0answers
17 views

compine bbcp with tar and split commande

I am trying to copy big files between tow remote servers with bbcp tool. I want to use tar command to create tarball and split it to small files during the transfer because there is no more free space ...
0
votes
2answers
53 views

How do I only copy a file, then manually navigate to another destination, and then paste it. (Without a fixed path)

I need to move a file from one directory to another without any fixed paths in the copy/paste command. That means I likely cannot have a one-liner copy/paste command: The folder structure is as ...
0
votes
2answers
83 views

Change SFTP user's permissions when transferring files to webserver

I created a webserver and have two users that can login over SFTP to change, edit, view, and create folders/new files. When the two users create a new file, the permissions are -rw-r--r--. I need the ...
1
vote
0answers
29 views

How can I set a unix binary as a default application in Mac OS High Sierra?

I want to configure mupdf to be my default PDF viewer in Mac OS, but it's a unix console executable located in /usr/local. The traditional "Open with" method does not work, as Finder will not allow ...
0
votes
1answer
55 views

Using `ls` to show real name of file owners

Unix users can have their real names listed in /etc/passwd/. The finger command can display the real names. Can ls -l show these real names of file owners next to the files? If ls cannot do this ...
1
vote
1answer
39 views

find matched file_ids within the dat files in the directory and copy them to a different directory

I have a file_id = 840920 and I have to pick only the child files that belong to the file_id = 840920. The names of the dat file are different but within all the dat file, the parent file id is ...
0
votes
2answers
51 views

Error when ssh to remote server when using sudo user

Trying to do ssh to remote machine over sudo user and getting error but doing ssh thru my normal user getting connection error. Here is the detail process. case_1 - ssh by Normal User - Working fine ...
0
votes
1answer
33 views

Usage of the percentile operator in shell scripts

In this link: https://superuser.com/a/180252/401901 The following command is used: cat list.txt | xargs -I % echo cp % new_folder What does the % % usage mean? All google search results are about ...
0
votes
1answer
19 views

The $1.gz exists in the folder, but it said cannot access, no such file or directory

I have a script that says gzip -cN "$1" > "$1.gz" | ls -l "$1.gz" | awk '{print $5}' I run it with an argument of ff, and I get the error message ls: cannot access ff.gz: No such file or ...
0
votes
1answer
34 views

Date a GNU/Linux or Unix program was first released [closed]

When I uncover a new command, most recently column, I am curious as to how long this command has existed -- in appreciation of the longevity of Unix, its dedicated developers, and my own ignorance! ...
-3
votes
1answer
146 views

What distros are NOT affected by the new Code of Conduct? [closed]

What distros of Linux or Unix based operating systems are NOT subject to the new code of conduct recently implemented for Linux? And/or which use no code affected by this CoC? https://git.kernel.org/...
0
votes
2answers
26 views

UNIX: Using sed, how to print every 1st and 2nd lines in sets of 4 lines?

My file has multiple sets of lines. Each set has 4 lines. Line 1-4 is set 1. Line 5-8 is set 2 and so on. I need to print the first two lines from every set i.e line 1 and 2, line 5 and 6 and so on. ...
0
votes
0answers
26 views

Changing .csv file from UTF-16 to UTF-8 deletes file data

I tried changing character set of .csv file from UTF-16 to UTF-8 using the unix command iconv -f utf-16le -t UTF-8//TRANSLIT <input file> -o <output file> After running word count ...
0
votes
2answers
104 views

Loop and extract files matching a path

I am currently in a directory with many directories. $ ls the bad icons 100 the games icons 100 the beach & camping icons 100 the halloween icons 100 How can I extract ...
-2
votes
1answer
23 views

Is it possible to have stunnel listen to specific path?

I am able to configure Stunnel to listen for 'myserver:port', however I'd like to be able to have Stunnel listen for a specific path e.g. 'myserver:port/path' Does anyone happen to know if this is ...
-1
votes
1answer
27 views

SSH login Script

I am writing a script where i need to check login credentials of all servers. It should verify with password as well. I am using below logic but it fails with breaking the while loop when it success ...
0
votes
0answers
43 views

Directory has 730 permissions but file has 644 permissions - security issues?

If a UNIX parent directory is designated to have the access permissions of "730" but a file inside that directory has permissions of "644", is this a problem?
0
votes
0answers
56 views

How to see URLs with 'ps -ef | grep chrome' output?

I want to see the processes for every chrome tab along with their URLs. ps -ef | grep chrome does not seem to achieve those results. What ps options should I add?
0
votes
0answers
14 views

CUPS on RHEL: Duplicate One Printer's Config (not all of cups cfgs) to Add Identical Printers With Same Configuration

I am just looking to take the settings of one printer (intermec px4i) and clone them(only editing hostname and addr.) or make some sort of template so i can add the rest of the px4i's on our network. ...
0
votes
0answers
23 views

Restricting ssh and ftp access to unix server

I know I can restrict ssh and ftp access to my unix server by using tools like ufw (uncomplicated firewall). What if I restrict ssh and ftp access to one IP address (my home IP) and then suddenly lose ...
1
vote
1answer
63 views

Why NFS shows 100% but actual disk usage is some MB only

We have an issue with one of the NFS as its showing 94% usage as per df but actually some 10 BM only used. # df -h |grep lv-new-1401 cbjserver:/f04780/lv-new-1401 10G 9.4G 650M 94% /var/lib/...
0
votes
0answers
21 views

Identify Resource Usage of a Process: CPU, Memory and I/O

I need to request some AWS resources and in order to do so, I need to identify what are my requirements for: Number of CPU cores (maybe GPUs as well) (performs parallel processing) Amount of Memory ...
0
votes
1answer
29 views

Is there a way to display `free` updates in place without outputing new lines?

When I do free -m -s 1 it gives something like this: total used free shared buff/cache available Mem: 3789 3022 347 90 ...
0
votes
1answer
266 views

sudo su with password provided in jenkins?

I am stuck with one requirement in which I am switching to some "xxx" user and it asks for password every time. I am trying to automate this process with password hardcoded in Jenkins job. ex: sudo su ...
0
votes
3answers
57 views

chmod 1,2 and 4, what exactly do they do?

I was wondering about having only read, only write, or only execute permission, and what it means. If I have write permission only, does that mean I can append to, or replace the contents of the ...
1
vote
2answers
40 views

How to merge multi-line output to form a single line?

I want to join different line output to a single line like below. $ cat new.txt | grep Full | awk '{print $1}' 09/01/2018 08/25/2018 08/18/2018 08/11/2018 08/04/2018 07/28/2018 07/21/2018 I want ...
-3
votes
1answer
31 views

Question mark and no internet access

Suddenly, out of the blue, my internet is not working at all, I’ve tried all I found on the internet but in vain. I think is a dns problem or I don’t know. The problem occurred after I tried to switch ...
1
vote
3answers
95 views

How to get a line using a pattern before a line number?

I need to get a line which matches a pattern before a certain line number of a file. Example: linenum 1.fruits linenum 2.cherry linenum 3.apple . . linenum 7.orange linenum 8.apple2 . . . linenum 20....
0
votes
2answers
96 views

Sending terminal commands via SSH connection: Nested pipes

Hoi everybody, I am currently having a problem with sending commands over SSH via command line to a server. To have an easy example, I always send the "pwd" command - which should return the current ...
0
votes
1answer
25 views

Exclude mlocate.db from the Locate searches

Can the search be excluded in /var/lib/mlocate/mlocate.db? I just want you to look at the one I generated locally. With -d or modifying LOCATE_PATH, only the one created in local is added, but ...