Open In App

atrm command in Linux with examples

Last Updated : 04 Apr, 2019
Suggest changes
Share
Like Article
Like
Report
atrm command is used to remove the specified jobs. To remove a job, its job number is passed in the command. A user can only delete jobs that belong to him. Only superuser can delete any job even if that belongs to another user. Syntax:
atrm [-V] job [job...]
Options:
  • -V : Used to print the version number
    atrm -V 
  • job : Job number of the job which is to be deleted. To see the list of the pending jobs use following: Example 1: Deleting job number 22.
    atrm 22
    Example 2: Deleting multiple jobs in single atrm command:
    atrm 21 26
Alternative command for atrm: Syntax:
 at -r Job 
Example 1: Deleting single job:
 at -r 24
Example 2: Deleting multiple jobs:
at -r 25 27
const rawVideoDataMap = null; // Convert it into a JS Map const videoDataMap = new Map(Object.entries(rawVideoDataMap)); document.addEventListener('DOMContentLoaded', function () { let currentlySelectedTile = document.getElementById("video-info-container-title"); let firstVideoH2; let firstSelectedVideo var videoPlayer = document.getElementById('video-iframe-container'); if (!videoPlayer) return; var videoIframe = videoPlayer.querySelector('iframe'); if (!videoIframe) return; // Safely inject PHP data as JSON into JavaScript var resp = null; function postToIframeWhenReady(iframe, data, maxAttempts = 20, intervalTime = 100) { let attempts = 0; const interval = setInterval(() => { if (iframe && iframe.contentWindow) { try { iframe.contentWindow.postMessage(data, '*'); clearInterval(interval); } catch (err) { console.warn("❌ Failed to postMessage, retrying..."); } } if (++attempts >= maxAttempts) { console.warn("⚠️ postMessage failed: iframe not ready after multiple attempts."); clearInterval(interval); } }, intervalTime); } // Call the function right after iframe is confirmed to exist videoIframe.onload = function () { postToIframeWhenReady(videoIframe, { resp: resp, inView: false }); }; const playlistContainer = document.getElementById("video-playlist-container"); if(playlistContainer) { firstSelectedVideo = playlistContainer.querySelectorAll('.playlist-video-tile')[0]; if(firstSelectedVideo) { firstVideoH2 = firstSelectedVideo.querySelector('h2'); firstVideoH2.style.setProperty('color', 'var(--discussion-button-color)', 'important'); } } function changeCurrentPlayingVideoTitle(tile, autoplayed = true) { const playlistVideoTileHeading = tile.querySelector('h2'); if (playlistVideoTileHeading) { if(!autoplayed && firstVideoH2.innerText !== playlistVideoTileHeading.innerText) { firstVideoH2.style.setProperty('color', '#EC4E20', 'important'); } if(autoplayed) { let siblingElement = tile.previousElementSibling; const siblingElementH2 = siblingElement.querySelector('h2'); siblingElementH2.style.setProperty('color', '#EC4E20', 'important'); firstVideoH2 = playlistVideoTileHeading; } playlistVideoTileHeading.style.setProperty('color', 'var(--discussion-button-color)', 'important'); if (currentlySelectedTile) { currentlySelectedTile.innerText = playlistVideoTileHeading.innerText; } } } // Inject the video data map as a JS object window.addEventListener('message', function (event) { if (event.data.type === 'AUTOPLAYED_NEXT_VIDEO' && event.data.autoplayPlaylistEnabled) { // Changing the current video index on autoplaying the next video from playlist const allVideoTiles = Array.from(document.querySelectorAll('.playlist-video-tile')); changeCurrentPlayingVideoTitle(allVideoTiles[event.data.currentVideoIndex]); } }); if(playlistContainer) { playlistContainer.addEventListener('click', (event) => { const tile = event.target.closest('.playlist-video-tile'); // Find the index of the clicked tile const allTiles = Array.from(playlistContainer.querySelectorAll('.playlist-video-tile')); const currentIndex = allTiles.findIndex((el) => el === tile); if (tile) { const videoId = tile.getAttribute('data-video-id'); const videoData = videoDataMap.get(videoId); videoIframe.contentWindow.postMessage({ playlist: [videoData], inView: true, clickedVideoFromPlaylist: true, currentIndex: currentIndex }, '*'); // handleVideoTitle([videoData]); changeCurrentPlayingVideoTitle(tile, false); firstVideoH2 = tile.querySelector('h2'); } }); } });

Similar Reads

Article Tags :