HOWTO: print the nth line of a file
$ awk 'NR==1524' file.txt # print the 1524th line of the file using awk $ sed -n '1244p' file.txt # print the 1244th line of the file using sed
$ awk 'NR==1524' file.txt # print the 1524th line of the file using awk $ sed -n '1244p' file.txt # print the 1244th line of the file using sed
$ less +56g hugefile.txt # it goes to the 56th line $ less +56p hugefile.txt # it goes into the 56% of the file $ less +56P hugefile.txt # it goes to the...
Unfortunately MySQL doesn’t have any command to drop all tables or to truncate the database. It has just DROP TABLE and DROP DATABASE.
Open the file with vim, then type:
$ mongo MongoDB shell version: 2.4.5 connecting to: test > DBQuery.shellBatchSize = 100 100 > // Starting from now .find() will print out 100...
Pick your favorite from the following ones:
$ ls /tmp -file_with_leading_slash.txt generic_name.log -file_with_leading_slash2.txt $ rm /tmp/-file_with_leading_slash.txt #using full path $...