have a directory with many files. I am trying to write a shell script that will only show first 10 or 20 lines of a file. How do I display first 10 or 20 lines of a file on Linux or Unix-like systems? [click to continue…] Sysadmin because even developers need heroes!!!
ow do I grep all sub directories? How can I use grep command through all sub-directories on Linux or Unix like operating systems? How do I use grep to find pattern including all subdirectories on OS X/BSD/Unix-like operating systems? [click to continue…]
need to transfer a file called ‘some cool movie.avi’ that contains whitespace under rsync. How do I escape a filename or directory name with spaces in them while using rsync command under Linux / *BSD / Unix like operating systems? How do I use rsync when files / dirs contain spaces? [click to continue…]
am new to Linux sysadmin work. I am using vi / vim text editor to edit files located in /etc/ directory. I open files using
vi /etc/resolv.conf /etc/hosts
I can edit the /etc/resolv.conf file only. How do I switch between the two open files while using vim text editor under Linux / BSD / Apple OS X / Unix like operating systems?
[click to continue…]