Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 years ago. Improve this question For my assignment, I’ve to write a function to create a directory but I’m not al…
Bash/SH, Same command different output?
And the last one is correct. Why is that? and how to solve it? Answer Per POSIX, echo supports no options. Therefore, when echo -n is run with sh, it outputs literal -n instead of interpreting -n as the no-trailing-newline option: Note: Not all sh implementations behave this way; some, such as on Ubuntu (wher…
How to prevent git from committing two files with names differing only in case?
We develop in a mixed environment – some people work on Macs and some work on Linux. This has proven to be a bit of a challenge at times, as those people who work on Linux are used to having their filesystems be case sensitive, so there’s no issue committing (accidentally or otherwise) multiple fi…
No man page for the cd command
Ubuntu Linux 15.10 – I just noticed that there is no man page for cd This seems a bit strange. I tried: at the cmd line and I get back I was trying to find documentation on which is super-handy for flipping between the last dir and the current dir and cd — which seems to be an alias for
dump methods from shared libraries
to list all methods from a shared library I use the what has an output like this: But when I try to pipe the output of find into objdump like this I get this error: and this lib folder does contain a lot of shared library files. What is wrong with my command? SK Answer or objdump expects the name
How to turn the screen blanking/sleep mode off under CentOS 7?
After a few minutes my freshly installed minimal CentOS installation blanks the screen and disconnects the WiFi. The system wakes back up, when I hit any key. I am under the suspicion that this is related to the setting of the screen blanking and/or sleep mode. I’ve found a few hints on the web but most…
File Encryption/Decryption with AES using Linux
I’m using the OpenWrt Linux distribution and I want to encrypt a file using AES. How can I do that quickly and easily, and how can I—or someone else—decrypt it again? Answer The quickest and easiest way is to use openssl util (provided by openssl-util package). For example, to encrypt a file, issue the …
What happens after the execution of a handler function on the SIGCHLD signal in C?
I was wondering what exactly happens after the execution of a handler on a signal in C, more specifically on the SIGCHLD signal. I’m actually building a shell and I need to do this: User enters a command with “&” as the last argument A new process is created with fork The parent process …
How can low frame rate video be made to look more smooth?
I am trying to clean up a video that was recorded in 2003 in low-light conditions on what was possibly a cameraphone. The video has been cleaned up somewhat (cropped, logos removed and stabilized), but it remains quite jerky, due in large part to its low frame rate. What are some tricks that might clean up th…
Shell: How to check available space and exit if not enough?
I want to check if I do have enough space before executing my script. I thought about The space I want to check via Any suggestions? Answer Bringing it all together (set -e and cd omitted for brevity; Bash-specific syntax – not POSIX-compliant): df “$HOME” outputs stats about disk usage for …