≡ Menu


Delete SSH Keys

One my user leaves the office and I’d like to disable her access to our UNIX / Linux system. How do I delete ssh key from the UNIX systems so that user can not log in?
[click to continue…]

How To: Rename A File In Bash

How do I rename a file in bash under UNIX / OS X / Linux / BSD operating systems?
[click to continue…]

UNIX mv Command Examples

How do I use mv command to rename or move file under UNIX operating systems?
[click to continue…]

BASH: Prepend A Text / Lines To a File

I am a new Unix system user with a bash as a default shell. I can append text to a file using >> operator but how do I prepend a text to a file? I want the opposite operation of >>. How can I prepend some data to a text file?
[click to continue…]

Is There a UNIX / Linux unerase / undelete Command?

Q. Is There a UNIX / Linux unerase or undelete command? How do I undelete files under a UNIX / Linux system?
[click to continue…]

Q. I’m getting following error on my Debian Linux system:

mv cannot move /etc/resolv.conf.dhclient-new to /etc/resolv.conf: Operation not permitted

How do I fix this problem?
[click to continue…]

Bash Shell: Replace a String With Another String In All Files Using sed and Perl -pie Options

How do I replace a string with another string in all files? For example, ~/foo directory has 100s of text file and I’d like to find out xyz string and replace with abc. I’d like to use sed or any other tool to replace all occurrence of the word.
[click to continue…]

Howto: Linux command line utilities for removing blank lines from text files

Q. I want to change the formatting of a file. I just wanted to remove all blank lines from text file. How do I achieve this task w/o spending much time?
[click to continue…]