history

How to place my own code snippets on command line à la history?

How to place my own code snippets on command line à la history? I have hundreds of tested and tried commands and snipets saved in various text files. When I need to re-use one, I find and copy/paste to the command line. Though reliable this is a clumsy method. Compare this to the elegant way …

Total answers: 3

Why doesn't my sqlite3 history work after I run a dotnet core web app?

Why doesn't my sqlite3 history work after I run a dotnet core web app? Over the past year or two I’ve been using sqlite3 a lot for web development projects. Invariably I would stumble upon a problem where suddenly, the history of commands would no longer work (when pressing up arrow you get command history, …

Total answers: 1

Does any implementation of `which` output "no" when executable cannot be found?

Does any implementation of `which` output "no" when executable cannot be found? I am reading the source code of the Maven wrapper written for the Bourne shell. I came across these lines: if [ -z "$JAVA_HOME" ]; then javaExecutable="$(which javac)" if [ -n "$javaExecutable" ] && ! [ "$(expr "$javaExecutable" : ‘([^ ]*)’)" = "no" …

Total answers: 2

How to save the ssh commands history to a file

How to save the ssh commands history to a file I’m going to allow a server administrator freelancer to access my server to do some tasks for me, so I want to save all the SSH commands that will be used in a file so I can access this file later and make sure that …

Total answers: 1

Is there a difference between file permissions and mode?

Is there a difference between file permissions and mode? The terms "file permission" and "file mode" are often used interchangeably. However, some tools exclusively use one term or the other. Interestingly, the venerable chmod tool specifically refers to "file mode". Is there a technical or historical difference between them? Asked By: lonix || Source Technically …

Total answers: 2

What is the history of /etc/mtab and what updated it?

What is the history of /etc/mtab and what updated it? I updated an old linux boot disk with new utilities and shared libraries. It still had an empty /etc/mtab to start with, on the old disk the /etc/mtab was updated, on the new one /etc/mtab stayed zero. I see now we link /etc/mtab to /proc/mounts …

Total answers: 1

Has the linux kernel introduced incompatible changes to its "public API"?

Has the linux kernel introduced incompatible changes to its "public API"? I am trying to learn about Semantic Versioning, which states that the major version number should be bumped when an incompatible "public API" change occurs. My thought experiment is to try to understand what the linux kernel numbering would be at, since to my …

Total answers: 1

Which software emits dates in this format between dollar signs when exporting?

Which software emits dates in this format between dollar signs when exporting? Sometimes I see dates enclosed in between two $ (dollar) signs, eg. $Date: 2018/11/11 10:05:10 $ or $Date: Tuesday 06 April 2004 – 14:10:05$. I’ve seen this mostly on personal homepages, most probably written in some markup language and then exported to HTML, …

Total answers: 1

Why is `-W` reserved for vendor extensions?

Why is `-W` reserved for vendor extensions? Why does the POSIX standard reserve the -W option for vendor extensions of the system utilities? I do not understand why the letter ‘W’ is used. ‘V’ (for vendor) could make more sense. Maybe this question should be moved to Retrocomputing SE. Asked By: jiwopene || Source v …

Total answers: 2

Did Unix have a package manager?

Did Unix have a package manager? I’ve looked online but couldn’t get a straight answer. Plus, there are no mentions of package managers on the Unix books that I’ve read. One would imagine that someone/something needed to manage the installation/update/removal of programs; like we have today. But did the people at Bell Labs have a …

Total answers: 2

What is `/dev/sda0`? Is it a standard thing?

What is `/dev/sda0`? Is it a standard thing? While trying to understand this other question, I encountered /dev/sda0 being mentioned. I have some experience in Linux and I’m used to this scheme where sda, sdb, … are devices and sda1, sda2, … , sdb1, sdb2, … are partitions (each inside the respective device). In this …

Total answers: 4

HISTTIMEFORMAT messed up adb

HISTTIMEFORMAT messed up adb I set up earlier this month HISTTIMEFORMAT cause I needed to see the time on some of the commands I previously used. However, I most likely messed something up with those commands, because every time I try to use adb for anything (adb kill-server eg.) I get the following error: bash: …

Total answers: 1

Has Linux always separated User and Kernel space?

Has Linux always separated User and Kernel space? I was thinking back to my introduction to programming recently and remembered writing a C++ program that deliberately read and wrote to memory addresses at random. I did this to see what would happen. To my surprise, on my Windows 98 PC, my program would create some …

Total answers: 3

/usr/bin/startx : has anyone ever fullfilled the urgency ? How?

/usr/bin/startx : has anyone ever fullfilled the urgency ? How? I, as I can believe anyone around, have been firing /usr/bin/startx for decades experiencing nothing but 100% satisfaction for the job it serves. If it works… don’t fix it ! The author of the script is however explicit : Site administrators are STRONGLY urged to …

Total answers: 1

Historical reason for function keys having non-consecutive key sequences in xterm

Historical reason for function keys having non-consecutive key sequences in xterm I’m using gnome-terminal as my terminal emulator, which sets TERM=xterm-256color. The key sequences sent when pressing the function keys F1, F2, … are as printed by $ infocmp -L1 | grep _f | sort -V key_f1=EOP, key_f2=EOQ, key_f3=EOR, key_f4=EOS, # gap 4 key_f5=E[15~, # …

Total answers: 1

Alpine Linux – How to prevent .ash_history from being saved?

Alpine Linux – How to prevent .ash_history from being saved? How can one prevent .ash_history from being saved at all in Alpine Linux? Asked By: user1406372 || Source Try unset HISTFILE To make the change permanent, add it to your profile. It should be /etc/profile or ~/.profile Answered By: Peregrino69 Add the following line to …

Total answers: 2

What is the historical reason for limits on file descriptors (ulimit -n)

What is the historical reason for limits on file descriptors (ulimit -n) When I first borrowed an account on a UNIX system in 1990, the file limit was an astonishing 1024, so I never really saw that as a problem. Today 30 years later the (soft) limit is a measly 1024. I imagine the historical …

Total answers: 3

Is there a default clipboard history in Ubuntu? If there is, how can I access it?

Is there a default clipboard history in Ubuntu? If there is, how can I access it? Is there a default clipboard history in Ubuntu 20.04 or later? If there is, how can I access it? I know there are lots of available applications for saving clipboard history in the default Ubuntu repositories. Asked By: Cherwen …

Total answers: 8

Why does `dd` have `swab` functionality

Why does `dd` have `swab` functionality The manpage for dd notes an option swab swab swap every pair of input bytes Why? Don’t ask me what I’m trying to do — I’m not doing anything in particular, I’m just scratching my head. If were going to offer swaps, why not do it for all word …

Total answers: 1