How do I tell what type of file a UNIX executable file is?

Apparently macOS marks any unknown executable file with "UNIX executable file" as the filetype. How do I tell what kind of executable file a given file is? If the program was made for macOS, could it actually be a UNIX executable file?

I'm trying to view the compiled x86 assembly source code for programs, and I'm trying to find where that x86 assembly code is.

If this is the wrong subreddit to post this in, please direct me to other subreddit(s) this would be more suited to. Thank you.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/MrPiggens
πŸ“…︎ Oct 05 2021
🚨︎ report
Command in cmd to output the type of file something is? (like the file command in UNIX)
πŸ‘︎ 13
πŸ’¬︎
πŸ‘€︎ u/treacheroustoast
πŸ“…︎ Aug 29 2018
🚨︎ report
Its me again. Learning Unix File system
πŸ‘︎ 32
πŸ’¬︎
πŸ‘€︎ u/Baajjii
πŸ“…︎ Nov 25 2021
🚨︎ report
Software to change exif data (capture date) from file name in Unix Timestamp specifically

*Previous post got downvoted for no reason*

I have found software which can change capture date from filenames, but it didn't work great for my case.

My files are named in Epoch Unix Timestamp, so for example: 1295182548.jpg, so the date should be:
Jan 16 2011 13:55:48 (in my timezone).

I know ExifTool exist, but I don't know how to work with the command prompt.

An explaination for how to use it too, would be appreciated.

πŸ‘︎ 6
πŸ’¬︎
πŸ‘€︎ u/DonnaxNL
πŸ“…︎ Dec 12 2021
🚨︎ report
SMB file share not exposing unix file permissions?

Apologies if this has been asked before. I tried searching for file permissions and did not find exactly what I'm looking for.

I am accessing my synology from MacOS through a SMB share.

I notice that the file permissions when viewed from the mac are all -rwx------, even though the original files have different permissions.

I can verify that the permissions are correct on the NAS itself, by SSHing into the NAS and running "ls". However it seems that SMB is not exposing these permissions correctly. In all instances, I'm connecting using the same user.

In fact, if I mark a file as nonreadable (chmod a-r filename) on the NAS, I can still read the file on the mac fileshare!

I tried toggling advanced file permissions on the Shared Folder but it doesn't seem to change anything.

Is there any way to fix this?

πŸ‘︎ 9
πŸ’¬︎
πŸ‘€︎ u/ricecanister
πŸ“…︎ Nov 17 2021
🚨︎ report
xpilot was probably the apotheosis of Unix gaming, in that it required a giant rc file to actually be fun. news.ycombinator.com/item…
πŸ‘︎ 25
πŸ’¬︎
πŸ‘€︎ u/ProgVal
πŸ“…︎ Dec 05 2021
🚨︎ report
python-magic is an interface to the libmagic file type identification library. Which is the library behind the Unix "file" command github.com/ahupp/python-m…
πŸ‘︎ 35
πŸ’¬︎
πŸ‘€︎ u/placidified
πŸ“…︎ Feb 25 2013
🚨︎ report
NvDope: it's neovim, but dope! Blazing fast, modular (structured like how unix systems boot), and most importantly, all config is handled by one single file. github.com/Pocco81/TheSup…
πŸ‘︎ 121
πŸ’¬︎
πŸ‘€︎ u/Pocco81
πŸ“…︎ Aug 05 2021
🚨︎ report
Question about unix's file type bitmask

I'm interested in the bitmask that describes a file's type and permissions. I've found this link: http://www.perlmonks.org/bare/?node_id=196539 ... but something doesn't make sense to me. If there's 7 file types, why is the bitmask 017 octal? why are there 4 bits to describe 7 values?

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/fewdea
πŸ“…︎ Apr 25 2016
🚨︎ report
How to save a dot file in the same place across unix-based-systems?

I have a file that keeps track of past commands from a shell. My current shell saves them under Users/username but thats on macOS. I dont think this applies to other linux systems. And if I want to store it under a standard /home or /var the OS won't allow it. So where should I store this file or do I have to store it in different places depending on the OS the user uses?

πŸ‘︎ 10
πŸ’¬︎
πŸ‘€︎ u/GeroSchorsch
πŸ“…︎ Oct 12 2021
🚨︎ report
Copying files using UNIX system calls

int main(int argc, char* argv[]) {

int source, destination;

uint_t n;

source = open(argv[1], O_RDONLY);

destination = open(argv[2], O_CREAT | O_WRONLY | O_TRUNC, 0700);

if (source == -1 | destination == -1) {

write(2, "open prob", 9);

exit(EXIT_FAILURE);

}

uint_t* buffer = malloc(sizeof(char) * atoi(argv[3]));

while ((n = read(source, buffer, atoi(argv[3]))) > 0) {

if (write(destination, buffer, n) != n) {

write(2, "write prob", 10);

exit(EXIT_FAILURE);

}

}

close(source);

close(destination);

return 0;

}

Alright, the user is supposed to input ./SYScopy [sourceName] [destinationName] [sizeOfBuffer] and the program is supposed to copy the file for an example byte by byte and it does that fine, however if the buffer size 512 or higher the size of the copied file is 0, if it's in-between 200 and 512 it's partially copied. Grateful for any kind of help.

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/masqqqqq
πŸ“…︎ Nov 08 2021
🚨︎ report
Create MacOS application from UNIX executable file

Hi everyone! I have a program and from it I created an executable file. Now I would like to run it double clicking an icon. So from executable to app icon. Do you know how can I do it? I was thinking from C program or other I don’t know. Do you know how I can do it? Any suggestions?

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/_seeking_answers
πŸ“…︎ Sep 28 2021
🚨︎ report
TIL that in macOS, there is still a text file containing a calendar with events from LOTR left over from the '70s before Apple forked macOS from Unix/FreeBSD. You can find it at /usr/share/calendar/calendar.lotr
πŸ‘︎ 26
πŸ’¬︎
πŸ‘€︎ u/ItsNoah95
πŸ“…︎ Oct 08 2021
🚨︎ report
What is "the go way" for File-based cache in multiple plattforms (UNIX and Windows mainly)?

Example: I consume an API from a CLI tool (the CLI tool is made in go, the api can be anything, like a web api or a DB) and I would like to store the results in a cache on-disk (optionaly for x amount of seconds) to reduce the number of calls.

So far I was thinking on temp files, but I want it

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/phi_array
πŸ“…︎ Sep 29 2021
🚨︎ report
How to check ZFS File system storage pool on Linux/Unix cyberciti.biz/faq/how-to-…
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/nixcraft
πŸ“…︎ Oct 19 2021
🚨︎ report
How to view a text file on your Linux or Unix box like a pro!
πŸ‘︎ 86
πŸ’¬︎
πŸ‘€︎ u/DCGMechanics
πŸ“…︎ Jul 14 2021
🚨︎ report
IT’S A UNIX SYSTEM!!! FSN 3D File Browser from SGI Running on SGI Iris Indigo! reddit.com/gallery/no1vdi
πŸ‘︎ 61
πŸ’¬︎
πŸ‘€︎ u/rizzoislandgame
πŸ“…︎ May 30 2021
🚨︎ report
Has anyone collected all the news tickers into a Unix fortune file?

I'd like to add all the headlines from the news ticker to my Unix fortune file. I know I could just scrape them all from the wiki and reformat them, but has anyone already done this?

πŸ‘︎ 6
πŸ’¬︎
πŸ‘€︎ u/dancesong
πŸ“…︎ Sep 16 2021
🚨︎ report
I've worked on Unix platforms with very intuitive terminal control (for example, when you press the tab key, it cycles through all possible options for files/folders that fit the characters you've already typed). How do I customize my OSX terminal to do these things?

To start off... sorry if this is not a Unix question. Even after googling the issue a dozen times, I'm still not sure what the technically correct answer is when trying to call either OSX or RHEL "Unix".

At my old work, we used RHEL and the terminal was so intuitive to use. It had a lot of great features that I feel should be standard to any Unix environment, but are not standard with OSX. The two features I remember most prominently are:

  1. When you type in a command that includes a directory, for instance "cd ~/folder1/fo" and pressed the tab key, it would autocomplete. If ~/folder1/ contained three folders, foo1, foo2, and foo3, pressing tab would cycle through "cd ~/folder1/foo1", .."foo2", .."foo3", etc. I've also worked on systems where when the tab key was pressed in the same situation, it would list "foo1 foo2 foo3". I'd prefer either of these to the OSX default behavior of doing nothing unless there's a unique match.

  2. The terminal would color code different types of files differently. For example, files would be one color, folders another, symbolic links another, etc.

I imagine there are other useful custom configurations. How can I find and configure these types of options? I can't find anything useful in the System Preferences.

Thanks!

edit: I should also say I've already tried this, but it doesn't seem to have any effect. Not sure what's wrong with it. I created the ~/.inputrc file and added those lines to it, but it doesn't do anything new when tab is pressed in Terminal.

πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/DyslexicHobo
πŸ“…︎ May 01 2017
🚨︎ report
Singular use on directory and file names on Unix

Hi all,

First and foremost, I am not native english speaker.

When thinking about "should we use plural on table names?", I reflect on how the Unix, or its derivative Linux, name the directory or files, and then I realize that none of them use plural at all, even if Unix created in U.S.

For example, its not "/var/logs", but "/var/log", it's not "/etc/groups" but "/etc/group", it's not "/devs" but "/dev/", and so on. There are somes files though like /etc/ca-certificates, /etc/fonts, but I believe this is created after 2000s era (correct me if I am wrong here).

Edit: As non-native, but know English a bit, when I create directory that contains many picture, I would named that directory "Pictures". This reasoning does not apply to file naming on Unix, except pra-2000s. I hope you guys see what I means.

So, anyone know the history or reason for this?

Thank you.

πŸ‘︎ 6
πŸ’¬︎
πŸ‘€︎ u/rv77ax
πŸ“…︎ Aug 02 2021
🚨︎ report
Python or Unix programs/code to write headers for VCF files?

I have some model organism VCF data I am working on. I had to use liftOver to move them from an old build that the data was published on to two builds newer. I have tried CrossMap.py and LiftoverVCF (GATK4) and both work well for lifting the data from build1 --> build2 but both fail with all variants unmapped when trying to move from build2 --> build3. Further, bcftools complains on the build2.vcf because CrossMap.py (my liftover VCF software of choice) adds in additional header information that is not "standard" VCF header lines and it will not do any data analysis because of this throwing a "cannot parse header error".

To sidestep this issue, I have used BEDOPS to convert VCF to .bed using the vcf2bed function and then using the command-line version of UCSC's liftOver tool. Weirdly, the conversion from build1 --> build2 --> build3 has been seamless and while some variants from build2 --> build3 are obviously lost, I do not have a total unmapping failure like I do with CrossMap or LiftoverVCF. I was able to preserve the VCF INFO and FORMAT information by telling liftOver command line to ignore everything but the first 3 columns.

So, now I am left with a .bed file that is essentially a VCF file without the header and need to write a header. Are there any software or scripts you all are aware of that will do this automatically by plugging in a few key parameters? Or is this something you need to write almost virtually from scratch and then use bcftools annotate to attach it to the BigBed file?

Appreciate the help!

πŸ‘︎ 13
πŸ’¬︎
πŸ“…︎ May 16 2021
🚨︎ report
Unix Executable Files

TL;DR: is there any way to run macOS apps (Unix Executable Files) on Linux?

What I'm trying to do:

I'm sorry because I know this is a super basic and stupidity question but I googled it and couldn't find a yes/no answer. I use Windows and macOS on daily basis, and though I have an Ubuntu Live USB and a Linux Mint VM I don't really use Linux for anything other than messing around.

I've made a Hackingtosh VM for Catalina but then I couldn't get it working for Big Sur and I didn't even try too much because the performance is pretty lame. I could've tried to boot into macOS instead of trying to run it in a VM but I have 3 Windows 10 Pro Desktops and I need them to run Windows for features like Remote Desktop and Miracast. I know there might be workarounds but anyways, I ruled out macOS on them.

Thing is, I'm trying to find something like RDP but for macOS. I've tried VNC solutions like RealVNC and Teamviewer and although they might be good for support they feel pretty laggy, whereas RDP is super snappy. I've just found out that macOS has a built-in app called Screen Share that is way better than Teamviewer and I honestly don't get why they don't even put it in Launchpad. Anyway, awesome way of controlling my Mac Mini from my MacBook Air, but I want to control my Apple devices from my Windows 10 Desktops. So, thing would be to run Apple's Screen Share app in Windows instead, but of course, there's no way to run Unix Executable Files on Windows. So what about Linux? Could I run the app on a Linux VM? I know the answer is probably no and that I should probably learn about how package managers work to find out why but I don't know so if you wanna educate me, please do.

I guess that even if it does work in Linux, it would require some tweaking. I don't expect it to be copy pasting the folder containing the program and voila, but why isn't it so? I mean, in my extremely basic and limited programming knowledge, once I get the .exe (in windows, of course) I can copy and paste it to another PC and run it without any issues. I've done so with very litte programs I've made that don't even have a GUI, so I'm guessing things start to change when they get more complex. I know that copypasting doesn't apply for every .exe file, specially the ones that requires licenses, but how about Linux?

Edit: just read about Darling, which would be like Wine but for macOS, but it says that I can't be used for GUI program yet.

Edit 2: Well I've read some more and it seems like the

... keep reading on reddit ➑

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/RodLema
πŸ“…︎ Jul 20 2021
🚨︎ report
Connect dart over Unix Socket file

I've driven a side project where I need to talk a JSON RPC 2.0 protocol over a Unix socket. However, I'm not able to start to interact with this socket and I'm not able to see any reference on how to do that.

I see a post that dart introduces a Unix socket by InternetAddress but, I need to specify the port and the address. I think that the address is the path of the file but, I don't know what is the port in this case.

This is what I have

class RPCClient implements LightningClient {

  @override
  LightningClient connect(String url) {
    LogManager.getInstance.info(
        'Connection to JSON RPC 2.0 at the following link $url');
    var address = InternetAddress(url, type: InternetAddressType.unix);
    var socket = Socket.connect(address.host, 8888);
    return this;
  }
}

Any example on how to do some things with a Unix Socket where I have only the path of the file?

πŸ‘︎ 6
πŸ’¬︎
πŸ‘€︎ u/crazyjoker96
πŸ“…︎ Jul 30 2021
🚨︎ report
CliFM, The KISS File Manager for the Unix terminal

There's a newcomer in the arena of Unix' file managers!

https://preview.redd.it/bufy4nkm39x61.png?width=527&format=png&auto=webp&s=c9781c0d4b935c3a42944dd50e3fa63f99ae6d0d

CliFM is a fast, lightweight, and non-curses terminal file manager. Some of its most important features are:

  • Unlimited bookmarks
  • Files selection
  • Built-in directory jumper (similar to autojump, zoxide, and z.lua)
  • Built-in resource opener
  • Plugins support
  • Icons support
  • File previewer (as plugin)
  • Archives support
  • More than 40 Customizable keybindings
  • Customizable color-schemes
  • Shell commands support
  • Up to 8 workspaces
  • Profiles
  • History
  • Logs
  • Aliases

And many more.

Take a look at it here: https://github.com/leo-arch/clifm

If using Archlinux, you can find it in the AUR: clifm (stable) and clifm (git)

I share this in the hope that it will be helpful. Thank you very much in advance!

πŸ‘︎ 47
πŸ’¬︎
πŸ‘€︎ u/archcrack
πŸ“…︎ May 05 2021
🚨︎ report
u/totallylegitcanser explains how "everything is a file" in UNIX and GNU/Linux [xpost from r/linux4noobs] reddit.com/r/linux4noobs/…
πŸ‘︎ 34
πŸ’¬︎
πŸ“…︎ Jun 12 2021
🚨︎ report
Enable Unix File System (UFS) support in Linux

I tried to compile Linux with enabled UFS support, but i can't see the ”UFS support” in menuconfig, where's that?

πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/zielonykid1234
πŸ“…︎ Jul 05 2021
🚨︎ report
Correct Column Type For a Unix Timestamp with Microseconds

Hi,

Currently I have a column of type char that stores unix time with microseconds as follows:

 `last_update_utime` char(18) COLLATE utf8mb4_unicode_ci DEFAULT NULL 
  COMMENT 'Unix Time of Last Update with mseconds'

I update that column as below;

UPDATE `transaction_tbl` 

SET    `transaction_token` = '$token',
       `last_update_utime` = UNIX_TIMESTAMP(LOCALTIMESTAMP(6))

WHERE  `user_id` = '$userID'

I use the field last_update_utime to address concurrency.
What is the correct column type for unix timestamps with microseconds ?

i have seen posts on the web stating int(11) or bigint(20)
but the issue of microseconds is not addressed ?
Is keeping the column type to 'char' sufficient or better to use something like decimal(18,6) ?

Pls advise.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/gmmarcus
πŸ“…︎ Aug 02 2021
🚨︎ report
Unix file pre-processor for custom templating around any system

I needed a tool to make my life easier once I started re-writing most of my dotfiles...

It is by no means "done" but "it works". Thought I'd share if anyone else might be interested, I'll keep developing it as my needs grow (and if anyone else has better ideas for it).

Perhaps Rust would be better in the long run for a massive amount of files, but that's for later.

It's a single script and that's pretty nice, so anyway here it is together with some more info.

https://github.com/0x20F/ix

πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/SirTheViking
πŸ“…︎ May 31 2021
🚨︎ report
Converting old pro tools SD2 files that have turned into Unix executable files?

Hi, I'm gutted I have a 2002 session that should be SD2, but now shows all files as Unix executable.Is there a trick to convert these to wav still? Thanks.
PT12
MBPRO 2012 High Sierra
Haven't tried anything, no real info online about the issue. :(

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/djtopcat
πŸ“…︎ May 31 2021
🚨︎ report
CliFM, The KISS File Manager for the Unix Terminal

CliFM: The new challenger in the arena of Unix' file managers!

https://preview.redd.it/k9biox4v0cx61.png?width=527&format=png&auto=webp&s=df9bc26a886a359f615949f70bc01169f1f57bec

CliFM is a fast, lightweight and non-curses terminal file manager. Some of its most important features are:

  • Unlimited bookmarks
  • Files selection
  • Built-in directory jumper (similar to autojump, zoxide, and z.lua)
  • Built-in resource opener (xdg compatible)
  • Plugins support
  • Icons support
  • File previewer (as a plugin via FZF)
  • Archives support
  • More than 40 customizable keybindings
  • Customizable color schemes
  • Shell commands support
  • Up to 8 workspaces
  • Profiles
  • History
  • Logs
  • Aliases

And many more.

Take a look at it here: https://github.com/leo-arch/clifm

If using Archlinux, you can find it in the AUR: clifm (stable) and clifm (git). Color schemes are available at both Github and the AUR.

I share this in the hope that it will be useful. Of course, any feedback will be highly appreciated. Thank you very much in advance!

πŸ‘︎ 10
πŸ’¬︎
πŸ‘€︎ u/archcrack
πŸ“…︎ May 05 2021
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.