Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.

Sign up to join this community
Anybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top

Top Questions

22 votes
3 answers
6k views

I lost files by using the "mv" command and I don't know where they are!

12 votes
8 answers
1k views

How can I replace a character within a specific context in each line of the whole file?

12 votes
4 answers
1k views

Delete a file called '.env'$'\r'

18 votes
4 answers
2k views

What's the POSIX-compliant way to get the epoch timestamp in a shell?

27 votes
2 answers
2k views

When using cat to create file, I have to type ctrl+d twice to finish the input, is this expected? [duplicate]

16 votes
2 answers
2k views

Are there security consequences from not giving printf a format to use?

8 votes
6 answers
2k views

Completely lock user account on server, including ssh

13 votes
1 answer
1k views

Why is echo -e behaving weird in a Makefile?

11 votes
2 answers
1k views

Is there a file besides /etc/passwd that contains/defines my UID?

4 votes
3 answers
911 views

Why are the signal lists for kill, killall and pkill not the same?

5 votes
4 answers
702 views

Shellcheck approved way to pass 2 arguments in one variable, to a command in a bash script

2 votes
8 answers
306 views

awk filter rows that only consist a single letter

5 votes
3 answers
571 views

bash + how to compare arg to one of the disks in linux machine

4 votes
1 answer
2k views

Why is zsh listening on port 22?

2 votes
3 answers
552 views

How to set "[}" or "[)" as FS for gawk?

5 votes
2 answers
649 views

How do I tell which partition I booted from?

8 votes
2 answers
1k views

In bash, how do I get the index of the last element of an array without a loop

7 votes
4 answers
653 views

Save file changes if you forgot to use sudo [duplicate]

3 votes
6 answers
483 views

Convert the first letter of all "."-separated parts of a filename to uppercase except for the last one in Mac Bash

5 votes
5 answers
368 views

If column has multiple values, copy line with each value separately

3 votes
6 answers
324 views

Swap lines in a file

7 votes
1 answer
521 views

How is awk doing comparison in this case?

10 votes
1 answer
595 views

Different behaviour of subshells and && in bash vs zsh

4 votes
2 answers
504 views

Bash script segmentation fault

5 votes
2 answers
460 views

Different behavior between SSH into VM and running SSH commands from script

5 votes
3 answers
419 views

POSIX shell comment vs line continuation

3 votes
5 answers
269 views

Bash: sed or awk rewrite of numerical sequence

4 votes
1 answer
485 views

Using "useradd" command correctly

3 votes
2 answers
312 views

Filtering find results by length

6 votes
1 answer
475 views

What is correct or suggested approach to send the signal name through 'kill' command?

5 votes
4 answers
358 views

Convert to uppercase, except for escaped characters

4 votes
2 answers
405 views

cut /etc/passwd but without colons (:) in the resulting set of fields

3 votes
2 answers
286 views

diff program gives false positive for files with non-ASCII characters in filename

6 votes
2 answers
459 views

Find all “real” filesystems mounted in a directory tree

1 vote
3 answers
322 views

What is a command? [closed]

4 votes
1 answer
274 views

How to unset an invalid environment variable in bash?

6 votes
1 answer
258 views

Debian: "dpkg -l" name field sometimes includes arch/abi, sometimes not. Why?

4 votes
1 answer
254 views

What does the "-d" option of the "read" shell command do when I use it with an empty string as argument?

2 votes
2 answers
171 views

tr command unable to process colour output piped from grep

2 votes
2 answers
168 views

bash count files in path with wildcard and assign to a variable

3 votes
1 answer
215 views

Is my zoneinfo backwards or am I confused

-2 votes
4 answers
126 views

sed or awk: replace only the n-th occurence of a string

2 votes
2 answers
254 views

find files matching pattern inside directory matching another pattern

3 votes
1 answer
316 views

What is the link between g++ and gcc-c++ in Fedora's DNF repositories?

3 votes
1 answer
146 views

Handle names with spaces when iterating recursively over files [duplicate]

2 votes
1 answer
257 views

Prevent shell script from hanging on a line

3 votes
1 answer
224 views

Portable Linux emulator on Windows?

0 votes
1 answer
918 views

Enable Wayland in PopOS 22.04


Looking for more? Browse the complete list of questions, or popular tags. Help us answer unanswered questions.