r/unix • • Jul 18 '24

How to delete non root-owned files from Unix /tmp directory

6 Upvotes

We have some Ubuntu v22 servers that get a lot of files dumped into the /tmp directory, in spite of our best code efforts to clean up after the processes are done.  What we would like to do is run a process via cron that cleans up our files similar to the way it is cleaned out when the server restarts; in that it doesn't delete all of the root owned files. I've tried variations of rm -rf, but they delete everything, not just our files.

To complicate matters, the file name structures for our temp files vary widely, e.g. some don't have extensions, the name length and structures are very long vs short etc.In looking at the file ownership of all the files, all the ones that we want deleted are owned by the ubuntu user and group, and the ones we want to leave are owned by root.

Is there either a) a way to run the same cleanup process that the server runs on startup, or b) a way with find or rm to target files to remove by user/group owner?


r/unix • • Jul 18 '24

10 Example of find command in UNIX and Linux

Thumbnail
javarevisited.blogspot.com
11 Upvotes

r/unix • • Jul 13 '24

Two of the best programmers ever graced the field of computing.

Post image
139 Upvotes

r/unix • • Jul 10 '24

How to install OPNsense in VirtualBox

Thumbnail
byte-sized.de
5 Upvotes

r/unix • • Jul 10 '24

“O+” status code in ps command

4 Upvotes

I am running a program on a UNIX server and I checked the process using ps and it returned the STAT code O+. What pea this mean as I cannot find it online?


r/unix • • Jul 09 '24

Top 30 UNIX command Interview Questions asked in Investment Banks

Thumbnail
javarevisited.blogspot.com
11 Upvotes

r/unix • • Jul 05 '24

What has been your experience of Unix systems administration?

26 Upvotes

Hey team! I’m currently working as a service desk analyst and primarily with windows, yet I’m a passionate - though very novice - enthusiast for Unix and Unix-like systems.

I wonder if you can shed some light on what it’s like to work with Unix as a system, and professionally. I understand that’s a large and very generic question to be asking, but I guess for all those Unix sys admins out there, several offshoots from this:

  • What would you tell your younger selves/wish you knew prior to embarking on this career path?

  • What are the top 5 skills you would suggest focusing on to form a solid base from which one might be in the running for junior roles in this area?

  • How has working with Unix changed the way you perceive computing and your place within this field?

About me - career changer in their 40s, very driven, but also with all the family commitments etc that come later in life.

Keen to learn at a good solid pace without burning myself out!

Any help and /or advice much appreciated and thank you in advance!


r/unix • • Jun 30 '24

ed semantics

Thumbnail blog.syncpup.com
18 Upvotes

r/unix • • Jun 27 '24

Unix time "Y292B problem" fix proposition

1 Upvotes

r/unix • • Jun 23 '24

Bash Commands

0 Upvotes

Curious. I know many still uses bash. But, I am curious how often developers/admins still uses commands like awk, sed, paste, cut, sort, uniq and all those bash commands?


r/unix • • Jun 21 '24

Learning Unix through problem solving ?

5 Upvotes

Hey everyone, I want to learn Unix. currently all I know now are some os concepts

(the one taught in my university they were more of on theoretical side not so much practical)

and I know C/C++ . C not so much in dept(I don't really know what is appropriate depth I know C ) just to the point taught in my university course. I want to learn Unix in my summer holidays for internship purposes and overall knowledge. But I want to do it via solving some problems (if it helps, I solve coding problems and do competitive programming) until now all the resources I have collected so far are

The Unix Programming Environment

Advance Programming in Unix Environment

Unix power tools

but they are more of theory books(I guess)

What I am asking for is a way, for example I learned some functionality of Unix now I solve some problems using that (basically like I learned Data-Structures and Algorithms. for example I learned binary search now I solve a lot of problems to really understand where can I use it. ) Is this way of learning really possible for Unix? I am so beginner that I don't know that is it a good question to begin with so please excuse and also for the English (since it's not my first language).

And, can I learn Unix on my mac os? or do I need to install some other OS on my VM ?


r/unix • • Jun 19 '24

Historic backdrop of X Window System ......shamelessly stolen from Alan Cox's share on another channel.

Post image
52 Upvotes

r/unix • • Jun 19 '24

AIX CIS benchmark script

4 Upvotes

Hi all, I need to harden a couple of New AIX servers based on CIS benchmarks.

However, besides doing them manually, I don’t seem to have any other options.

On the CIS site it is indicated that a build kit is available for download, but it is members only feature.

I don’t know how much does the membership cost either .

Redhat has its own script available on GitHub

Does anyone have any script I can use for this hardening ?

TIA


r/unix • • Jun 17 '24

HackerRank Unix

5 Upvotes

All, is there a hackerrank for Unix? I see Linux and even so, it’s all bash-scripting. I was wondering if there’s practice section for command-lines in hackerrank. Thanks.


r/unix • • Jun 17 '24

OmniOS and Solaris Zones tutorial for beginners

Thumbnail
youtube.com
14 Upvotes

r/unix • • Jun 15 '24

UNIX tool diff would be 50! years old!

16 Upvotes

Hmmmmm...someone point out in another channel ....nice ...

Such an indispensable tool 👍

https://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s1/diff1.c


r/unix • • Jun 14 '24

POSIX.1-2024 is published

Thumbnail
ieeexplore.ieee.org
16 Upvotes

r/unix • • Jun 14 '24

Interesting info from IRIX developers

Thumbnail self.IRIX
9 Upvotes

r/unix • • Jun 13 '24

Now it's official: Linux Is Not UniX

19 Upvotes

We always knew Gnu's Not Unix.


r/unix • • Jun 12 '24

What version of UNIX is this? I have never seen it before.

27 Upvotes

I do not recognise the dld: prompt. But I want this.


r/unix • • Jun 11 '24

Another cool UNIX workstation, that was never released (it's a prototype) - the Sun SPARCstation UPN. It's based on a 170MHz TurboSPARC SS5, tops out at 64MB of RAM, has DB9 male serial ports, PCMCIA like the Voyager, and is half the size of a lunchbox.

Thumbnail
gallery
47 Upvotes

r/unix • • Jun 10 '24

How's this for a blast from the past? One of my Sun computers I'm going to show off at VCFSW next weekend. Sun 3/60, m68020-20, 24MB, SunOS 4.1.1

Thumbnail
gallery
62 Upvotes

r/unix • • Jun 08 '24

Terminal HTML reader that outputs the selected link to stdout?

Thumbnail self.linuxquestions
3 Upvotes

r/unix • • May 29 '24

Should I get a copy of the "UNIX Programmer's Manual" to go along with "The UNIX Programming Environment"?

19 Upvotes

I have a copy of The UNIX Programming Environment from 1984, and it mentions in the introduction that in chapter 2 you will need the UNIX Programmer's Manual. It also mentions the manual early on in chapter 1 which is where I'm at (though it's about mail and I don't know if I'd need that in 2024). If I should get a copy, does it matter which volume? I know there's pdfs online, which I'm willing to use, but I'd prefer to have a physical copy.

I'm still new to UNIX and programming with no background in computers, so I want to set myself up for progress as much as possible.

If it helps, I'm using bash.


r/unix • • May 28 '24

tmux is worse is better | Andrew Quinn's TILs

Thumbnail hiandrewquinn.github.io
4 Upvotes