Score:0

Symbolic link to read a syfs directly

cn flag
DEV

Is there a way to read a sysfs using a symbolic link

if I want to read a sysfs, for example, cat /sys/bus/usb/gps/time we usually type the cat followed by sysfs path and then enter

Is there a way to symbolick the command to some variable and read back I mean ln -s ( cat /sys/bus/usb/gps/time) sysread, so that when I type sysread it will print the cmd out which is same as alias I can only link the path but not with cat command so is there a way to do it.

Score:0
it flag

No, you cannot "symlink a command", that is what alias is for:

alias sysread="cat /sys/bus/usb/gps/time"

Add the above line to your shell's startup (read man $(basename "$SHELL")file to make it "permanent", probably $HOME/.bashrc.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.