A list of puns related to "Unix file types"
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.
*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.
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?
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?
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?
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.
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?
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
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?
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:
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.
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.
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.
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!
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 β‘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?
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:
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!
I tried to compile Linux with enabled UFS support, but i can't see the βUFS supportβ in menuconfig, where's that?
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.
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
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. :(
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:
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!
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.