Found 1383 Articles for Open Source

How to overwrite a file to hide file contents, and make original contents unrecoverable in Linux?

Shilpa S
Updated on 01-Jul-2021 15:18:12

4K+ Views

To overwrite and file contents in the Linux system, we use the shred command using the terminal.shred – The shred command is used to securely delete files and devices. This command overwrites a file to hide file contents, and optionally delete the file so that it is very difficult to recover the file for any software in the Linux/Unix system.As usual, to remove files from the system, we use the rm command using the terminal. After removal files through the rm command, it may be recoverable using the software whereas after removing files through the shred command files are unrecoverable ... Read More

How to move jobs to the background in the Linux system?

Shilpa S
Updated on 01-Jul-2021 14:50:52

2K+ Views

To move foreground jobs in the background, we use the bg command in the Linux system.bg (background) – The bg command is used to move foreground jobs in the background. It resumes execution of a suspended process in the background. If no job is specified, then the bg command work upon the currently running process.SyntaxThe general syntax of the bg command is as follows −bg [job_spec ...]Job Identifiers −Sr.No.Notation & Meaning1%nJob number2(n)%stringRefer to a job which was started by a command beginning with string3%? stringRefer to a job which was started by a command containing string4%% or %+Current job5%-Previous jobExit ... Read More

How to move a file, group of files, and directories in Linux?

Shilpa S
Updated on 01-Jul-2021 14:47:49

17K+ Views

The mv (move) command is used to move one or more files or directories from one directory to another directory using terminal in the Linux/Unix operating system. After using the mv command file is copied from source to destination and source file is removed. The mv command is also used to rename the file.SyntaxThe general syntax of the mv command is as follows$ mv [OPTION]...[-T] SOURCE DESTINATION... $ mv [OPTION]...SOURCE... DIRECTORY... $ mv [OPTION]...-t DIRECTORY SOURCE...Brief description of options available in the mv command.Sr.No.Option & Description1--backup [=CONTROL]Create backup of destination file2-bCreate backup file without argument3-fDo not prompt before overwriting4-i, interactivePrompt ... Read More

How to merge lines of files in the Linux system?

Shilpa S
Updated on 01-Jul-2021 14:39:22

7K+ Views

To merge lines of files, we use the paste command in the Linux system. The paste command is used to combine files horizontally by outputting lines consisting of the sequentially corresponding lines from each FILE, separated by TABs to the standard output. When it has completed its operating for the last file, paste will output newline character and move on to the next line.SyntaxThe general syntax of the paste command is as follows −paste [OPTION]... [FILE]...Note – with no FILE the paste command read input from standard input.Brief description of options available in the paste command.Sr.No.Option & Description1-d, --delimiters=LISTReuse characters from ... Read More

How to list the directory content in Linux?

Shilpa S
Updated on 01-Jul-2021 14:36:48

18K+ Views

In the Linux operating system, there are two commands available to list the directory contents.ls (list) commanddir (directory) commandListing the contents of the file using ls command.ls (list) – the ls command is used to list the directory contents in the Linux system. By default, the ls command displays the content of the current directory. The ls command is also available in EFI (Extensible Firmware Interface) shell.SyntaxThe general syntax of the ls command is as follow −$ ls [OPTION]... [FILE]...Brief description of option available in the ls command.Sr.No.Option & Description1-a, --allDisplay all files including hidden files2--authorDisplay author of each file ... Read More

How to join lines of two files on a common field in Linux?

Shilpa S
Updated on 01-Jul-2021 14:33:38

894 Views

To join lines of two files on a command field, we use the join command in the Linux system. The join command is used to join lines of two files on a common field in the Linux system. If we have two files and we want to join lines of files then no need to combine both files. We can join lines without combining files using the join command. By default, the join field is the first, delimited by blanks.SyntaxThe general syntax of the join command is as follows −join [OPTION]... FILE1 FILE2Note – If FILE1 or FILE2 or both ... Read More

How to format contents of a text file in the Linux system?

Shilpa S
Updated on 01-Jul-2021 14:31:13

2K+ Views

Sometimes our text files are not well format to represent. This work can be done manually for small file, but if the file is too large then manually formatting is so tough work. In such a case to format the contents of a text file in the Linux operating system, we use the fmt command.The fmt command is used to format, simplifying, and optimizing text files in the Linux system. If the file is not specified then the fmt command reads input from standard input. By default, the fmt command creates text to a width of 75 characters wide.SyntaxThe general ... Read More

How to flushes file system buffers in the Linux operating system?

Shilpa S
Updated on 01-Jul-2021 14:29:19

1K+ Views

To synchronize cached writes to persistent storage, we use the sync command in the Linux operating system.The sync command is used to synchronize corresponding file data in volatile memory and persistent storage.SyntaxThe general syntax of the sync command is as follows −sync [OPTION] [FILE]...A brief description of options available in the sync commandSr.No.Option & Description1-d, --dataSynchronize only file data, no unneeded metadata.2-f, --file-systemSynchronize the file systems that contain files.3--helpDisplays a help message and then exits.4--versionIt gives info about the version and then exits.Note - If one or more files are specified, synchronize only them, or their containing file systems.To synchronize ... Read More

How to display the last part of the file in the Linux system?

Shilpa S
Updated on 01-Jul-2021 14:27:09

18K+ Views

To display the last part of the file, we use the tail command in the Linux system.The tail command is used to display the end of a text file or piped data in the Linux operating system. By default, it displays the last 10 lines of its input to the standard output. It is also complementary of the head command.SyntaxThe general syntax of the tail command is as follow −tail [OPTION]... [FILE]...Brief description of options available in the tail command.Sr.No.Option & Description1-c, --byte = [-]NUMDisplay the last NUM bytes of each file. Or -c +NUM to display starting with byte ... Read More

How to display the first part of the file in the Linux system?

Shilpa S
Updated on 01-Jul-2021 14:23:54

11K+ Views

To display the first part of the file, we use the head command in the Linux system.The head command is used to display the beginning of a text file or piped data. By default, it displays the first ten lines of the specified files. The tail command is also used to display the ending part of the file.SyntaxThe general syntax of the head command is as follow −head [OPTION]... [FILE]...Brief description of options available in the head command.Sr.No.Option & Description1-c, --byte = [-]NUMDisplay the first NUM bytes of each file. With the leading ‘-‘, print all but the last NUM ... Read More

Advertisements