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
0answers
28 views

How to compare two 400TB large directory trees with 100s of millions of files, fast? [closed]

I have two file servers with about 400TB of data in way more than 100 Million files, ranging from small files (think git repositories) to multi-GB files (think database dumps or larger). I want to ...
0
votes
1answer
8 views

How to install mkclean?

Download the tar file from this link . > wget https://sourceforge.net/projects/matroska/files/mkvalidator/mkvalidator-0.5.2.tar.bz2/download Unzip the archive with tar. > tar -xjf ./download I ...
0
votes
0answers
13 views

Building a custom nas and time machine backup server [closed]

current situation For the longest time, I had only a bunch of hdds for my data and backups respectively. In particular, I currently have an external drive with a time machine partition and a data ...
1
vote
2answers
2k views

How do I sort files by date in filename?

I have a set of filenames like this vorlesung 02.11.15.mp4 vorlesung 04.01.16.mp4 vorlesung 07.12.15.mp4 vorlesung 09.11.15.mp4 vorlesung 09.12.15.mp4 ... The last part of the file name is a date in ...
1
vote
2answers
42 views

Command line: merge and keep all info from the two files

How to merge and keep all info from the two files as such ? $ cat file1.txt apple cool dude flan $cat file2.txt apple ball cool dude elephant for a result as such : $cat ...
0
votes
0answers
9 views

Combine diff between binary files a.tar and b.tar, to a.tar on different machine to create b.tar

I have two binary files, yesterday.tar and today.tar on a machine-A. The two files should be pretty similar (I did hexdiff, and they look very similar). I have another machine (machine-B) with "...
1
vote
1answer
63 views

why isnt the inode id of dotdot didnt have the updated inode id?

I have a function that backtracks from the child directory to the root by getting the inode id of the parent from the ".." dentry of the child. The main purpose of this backtracking is to ...
148
votes
10answers
219k views

List the current folder folder's sizes with the terminal?

I want a list of the folders from the current directory or one that I specify with their size. I have tried with du but I only get the size of the directories I specify (du . ./f1), and ls doesn't ...
43
votes
6answers
24k views

Mac OS X: at command not working

I am going to schedule a job by using at command. Here I tried the following command: $ at now + 1 minute echo 'Test at command' <EOD> I saw the job is scheduled by using at -l. However, I saw ...
0
votes
1answer
67 views

Where are the SquirrelMail Logs?

I am having problems sending mail using SquirrelMail. I asked the open source support for help and here is there response. What you need to do is look in your logs and show the error that is ...
0
votes
0answers
7 views

Control Yamaha Receiver from the command line [closed]

I want to control my Yamaha receiver from the unix command line of a raspberry pi. The solution should offer a way to put music into the playlist and to start playing. (From my phone I use BubbleUpnp ...
0
votes
2answers
3k views

How can I send email with attachment xls file using shell script as application/xls mimetype without making the received file becoming unreadable

#!/bin/bash ATTACH1=file.xls<br> SUBJECT="subj"<br> FROM=me@domain.com<br> TO=you@domain.com<br> CC=them@domain.com<br> MIME="Application/vnd.ms-excel" <br> FILE=$...
0
votes
0answers
20 views

having trouble calling functions in my code

I'm new to bash scripting and in this file I'm trying to clean up my code. The first one works perfectly. In the second one, I simply put code into two functions and call them within the case and if ...
88
votes
6answers
34k views

What is the origin of the UNIX $ (dollar) prompt?

The UNIX prompt uses a $ symbol to indicate that your input is expected. I was wondering why this symbol was chosen—if there is a reason. Dollar just seems a little unexpected. A > symbol would ...
0
votes
1answer
22 views

how can I show users who has only one session opened?

How do i find users who has only one session opened? I know I can find who has multiple session opened using: who | cut -d " " -f 1 | uniq -d
0
votes
1answer
24 views

how do I display the current users who logged into the system more than once?

So far I can list the names of the users who logged in. However, how can I display the users logged in more than once? finger | cut -d " " -f 1 | sort -u
0
votes
1answer
123 views

How do I set up tunneling in MobaXterm similar to my current PuTTY setup?

Here's what I do with PuTTY: PuTTY settings, Connection > SSH > Tunnels: source = 8000 destination = 0.0.0.0:8000 And then after I ssh into ServerA (a unix jump server in this instance), I use ...
90
votes
15answers
75k views

How can I trigger a notification when a job/process ends?

The place I work at has commands that take a long time to execute. Is there a command/utility that I can use to notify me when the command execution is over? It could be a popup window or maybe a ...
1
vote
1answer
65 views

How do I stop a script from finishing if certain text is printed?

I am trying to automate domain join but want to make it so you cannot run some commands twice. I am trying to stop the script if the domain is already joined. Printed text if domain is already joined: ...
14
votes
2answers
38k views

Unix Script: Wait until a file exists

I need a script that will wait for a (examplefile.txt) to appear in the /tmp directory and once it's found to stop the program, otherwise to sleep the file until it's located So far I have: if [ ! ...
0
votes
1answer
24 views

How does Iconv handle endianness?

echo hello | iconv -f ascii -t utf-16le | od -x produces what seems to me like a big-endian result 0068 0065 006c 006c 006f 000a whereas the same line without the 'le' produces, on a ...
0
votes
1answer
22 views

Command 'date +%W' does not return week 00

Manual page for date(1) says: %W week number of year, with Monday as first day of week (00..53) I assumed there exists a week number 00, and I handle such week in my program, but once I decided to ...
0
votes
0answers
53 views

Can `sudo` alone be used to switch to another given a password?

I am currently writing a program in Go and trying to implement a switch user functionality. However, I can't find a clean way of sending a password via stdin to su. sudo -S allows for stdin password ...
-1
votes
0answers
17 views

Need to understand the summary out of \time command on unix

Using \time command to time any unix command, I am getting data like below at the end. How should we summarize this summary in terms of memory and runtime. 648.37user 180.74system 19:19.55elapsed 71%...
8
votes
3answers
5k views

How can I pipe the output of *all* entered shell commands into another? (e.g. pipe everything into 'lolcat')

Good Afternoon, (OS X user) I am specifically trying to pipe the output of every shell command I type into the ruby gem 'lolcat' (which makes the output to the terminal rainbow colored). Is there a ...
1
vote
2answers
4k views

Unix pipe: find | ln -s

I'm trying to symlink some php files using the following command: find `pwd` -name "*.php" | ln -s * /home/frankv/www/bietroboter.de/symlinks However, all the symlinks are broken because the little *...
1
vote
3answers
3k views

Find availble disk space in unix without parsing `df` output

When I type df -k ., I get the following output Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 16512936 8650196 7023932 56% / What I do is tail the last line and ...
121
votes
8answers
100k views

How do I configure SSH so it doesn't try all the identity files automatically?

I have been putting my ssh identity files inside my ~/.ssh/ folder. I have probably about 30 files in there. When I connect to servers, I will specify the identity file to use with something like ...
2
votes
4answers
3k views

Tool to monitor file read/write in unix

Is there any tool/command available in unix to monitor read/writes in a particular file. I also want to collect how much data is being read each time the file is accessed.
0
votes
0answers
40 views

accesstime on macOS Catalina 10.15

Suppose you own a file system on a unix machine, and you would like to know which of the regular files on this system you have accessed within some interval. ("Regular file" means it is not ...
1
vote
0answers
12 views

Why can't Libreoffice on FreeBSD save to Google Drive?

There are instructions out there on configuring "Remote Files" in LibreOffice. However, in my case, the Google Drive is not among the available options. Indeed, the instructions say, ...
1
vote
1answer
696 views

Appending new lines to multiple files

I'm trying to append new lines to multiple files with the following command: find -name *.ovpn -exec sh echo "line to append" >> {} \; before doing this, I ran a different command to make sure ...
0
votes
1answer
3k views

Unzip an archive that was split into 2 files

I have 2 zip files that were split using: zip -r -s 15 my_file.zip my_file.pdf Now I have 2 files: my_file.zip my_file.z01 How can I unzip them? Doing unzip my_file.zip I get: Archive: my_file....
0
votes
1answer
3k 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 ...
16
votes
5answers
20k views

How Many Unix Groups Can A User Be A Member Of?

We've recently run into a situation at a group-happy site where some group memberships are not being picked up. I seem to remember that there is an upper limit to the number of groups that a user can ...
170
votes
23answers
168k views

Is there a way to display a countdown or stopwatch timer in a terminal?

How can I display a real-time countdown timer on the Linux terminal? Is there an existing app or, even better, a one liner to do this?
1
vote
1answer
1k views

The OSX Process that won't die

I've got a process on OSX 10.9.5 that just won't die. I have tried kill PID kill -9 PID sudo kill -9 PID killall sshfs killall -9 sshfs sudo killall -9 sshfs Activity monitor / select process / Force ...
0
votes
1answer
28 views

Why do .sha256 hash files include asterisk before and after filenames?

I've seen .sha256 files for software such as: this_is_a_fake_sha256_hash_of_64_characters file_name.exe Or: this_is_a_fake_sha256_hash_of_64_characters *file_name.exe Or: ...
0
votes
1answer
4k views

How to delete multiple users?

How to I implement deletion of multiple users in my code. So Ihave an option as an admin to delete multiple users in 1 command: #!/bin/bash echo "SELECT $OPTION" echo "-------------" echo "1- ...
78
votes
3answers
82k views

Compress files from OS X terminal?

In the Finder, there is this wonderful ability to right click on a file or directory, select compress from the drop-down, and end up with a zipped file. Is it possible to do the same thing from the ...
3
votes
1answer
311 views

Is there a way to restart mac without reopen all apps via terminal?

I'm familiar with $ sudo shutdown -r now but I wonder is there a way to restart without reopen all apps?
6
votes
1answer
3k views

Mutt error '/home/user/mail/ is not a mailbox', but configured for use with gmail imap/smtp

I have successfully configured mutt to work with gmail imap. But when i try to send mail via gmail smtp, i get this error: /home/user/Mail/ is not a mailbox I cannot understand why /home/user/Mail ...
18
votes
5answers
8k views

Cat file to terminal at particular speed of lines per second

I'm lazy and I could write a script to do this, but I'm even too lazy to think of how to do it. I often do things like : cris$ python runexperiment.py > output.txt cris$ cat output.txt ...
0
votes
1answer
36 views

How reliable is the randomness of the shuf command?

I ran the following command to generate 1 billion random numbers: time shuf -i 1-1000000000 > "SHUF TEST 1" To my surprise it was able to do this in less than 10 mins. I then ran the ...
28
votes
2answers
12k views

Restart Systemd service automatically whenever a directory changes (any file inside it)

How do I restart a Systemd service when a file change. I've got a Java service that I want to reload when any jar file changes. This is my setup: srv.service [Unit] Description=srv 0.1: Service's ...
0
votes
1answer
3k views

How can I disable FTP access for users

I want to temporarily disable the FTP Access of the FTP users which are added from Cpanel I have tried chsh -s /sbin/nologin aadmi which says "chsh: user "aadmi" does not exist." Tried sudo echo ...
0
votes
0answers
12 views

Generating initramfs file to a selected location

Today, when we want to generate an initramsfs file using the command dracut [OPTION...] the initramfs file goes to /boot directory by default. is there a way to change the default location of /boot ...
2
votes
3answers
2k views

Mac server default file permissions

How do I change the default file permissions for files created on a Mac server? In case it's relevant, this is a Mac Mini running Mac OS 10.6.7. It's currently used mainly as a file server, and there ...
110
votes
5answers
34k views

How do I reload .inputrc?

Background I have heard that the readline module is reading ~/.inputrc and that is how it changes the behaviour of keystrokes under programs such as bash. Question How can I reload this after ...
17
votes
6answers
61k views

tcpdump – rotate capture files using -G, -W and -C

I'm looking to be able to capture a rotating tcpdump output which captures 30 minutes worth of data, into 48 files, cyclically. The man page implies this should be possible, but my testing doesn't ...

1
2 3 4 5
77