What do these commands mean?
What would be a more straight forward readable way of these commands?
What would be a more straight forward readable way of these commands?
I have a new requirement to purge MySQL dump files that are older than 30 days. The files use a naming convention of “all-mysql-YYYYMMDD-HHMM.dump”. The files are located on SAN mounted file system, so restoration is not an issue, but the drive space is limited unfortunately and fills up quickly so it requires frequent human intervention.
I alias rm to rm -i so that when I mistype file* as file * I get prompted before accidentally deleting files I didn’t intend to delete. Is there an equivalent idiom for directories?
How does one get ~/.bashrc aliases to evaluate $() substitutions at run time, instead of at the time that ~/.bashrc is executed (when opening a terminal)?
I want to make small bash scripts that will automate some stuff for me in new machines. The only thing I still do manual is creating files with vi and pasting the text on the file. How can I generate file X with “text i need here” inside it on bash? Without having to press … Read more
As of late, and without my deliberately doing anything to make it happen, my Bash prompt has an at sign (i.e. @) prepended to it. This did not previously happen. Nor can I see anything in my ~/.bashrc that seems as though it ought to be making this happen.
I frequently download PDF files with heinous numeric file names from my browser. These automatically go into ~/Downloads. Ideally I would like to just be able to open these files with:
I have a bunch of shell scripts which incorrectly assume /bin/sh to be equivalent to /bin/bash. E.g., they have the #!/bin/sh shebang, but use the source command instead of . (dot).
I’m using the Perl rename command line tool to search recursively through a directory to rename any directories as well as files it finds. The issue I’m running into is the rename command will rename a sub-directory of a file then attempt to rename the parent directory of the same file. This will fail because the sub-directory has been renamed resulting in a “No such file or directory”
I’m using the following sequence of commands in my .bashrc file to alter the appearance of my linux terminal. It fills the screen line by line with a pattern made out of characters. There is no abstraction, the characters are from a set within the command itself: