New answers tagged

1

Something like: ssh host; echo "Reconnect?"; while read; do ssh host; echo "Reconnect?"; done in your command should do the job. It connects to your host and when the connection is lost, it asks you for a reconnect. Or just simply as you wanted: ssh host; bash will connect to your host and when the connection ends, it gives you new shell


8

If shell of the host you are sshing to is bash version >= 4.0, you can enable the globstar option. When enabled, the ** glob will recursively match subdirectories. So the following should do what you need: shopt -s globstar for gz_file in **/*.jpg.gz; do gzip -d "$gz_file" done No manual recursing into subdirectories required.


3

While a shell script could be written to recurse the directories (but I don't think you have access to a remote sh), you could use this crude but effective shortcut, assuming your remote restricted ssh does wildcard expansion: gzip -d *.jpg.gz gzip -d */*.jpg.gz gzip -d */*/*.jpg.gz ... ...depending on the depth and size of the subdirectories. Note: If ...


8

To extract your files, you need to use gzip: gzip -d *.jpg.gz You mention doing this recursively; given that you don't have find, you'll have to visit each directory in turn and run the above command.


2

To install PostgreSQL on Ubuntu 14.04 server: sudo apt-get update sudo apt-get install -y postgresql postgresql-contrib Create a database and a user to access it sudo -u postgres createuser -P USER_NAME_HERE sudo -u postgres createdb -O USER_NAME_HERE DATABASE_NAME_HERE Test connecting to PostgreSQL psql -h localhost -U USER_NAME_HERE ...


1

To filter out either message in one grep, pull in the -E extended regular expression flag (for the "zero or once" meaning of ? below), and the -v inverse match: grep -Ev '^Remote:( Checking segments [[:digit:]]{1,3}\.[[:digit:]]%)?$' which says that the lines should (inverse) match: beginning of line ^ the string Remote: the grouped ( ... ) set of ...


4

You can disable X for a specific command line invocation by prefixing the command line with DISPLAY=: DISPLAY= gpg -d img0424.png.gpg That should give you the curses based pinentry interface instead of the GUI. But it is probably more efficient to download all the files with scp. The data volume transferred when displaying over X is likely to be more than ...



Top 50 recent answers are included