Remove file or directories

rm -i
puts rm command into interactive mode and prompts the user before it removes it

need to supply some example

Split a file into pieces

to split files use split(numbers of lines) and csplit(string of characters)

split -50 filename

it splits the file into smaller chunks every 50 lines

csplit splits files wherever it finds a match between its arguments and the content of the file

csplit -f newFileName filename "/Content of the file/" "/Content of the file2/" "/Content of the file3/"
argument must match with the content of the file.
In this case the file will be divided into pieces if the following strings are found in the file:
“/Content of the file/”
“/Content of the file2/”
“/Content of the file3/”

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s